Skip to content

Commit

Permalink
Updated dependencies through parent POM.
Browse files Browse the repository at this point in the history
  • Loading branch information
david-waltermire committed Nov 16, 2024
1 parent 1c403cf commit 04bea0d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,28 @@ public class XmlSchemaContentValidator
extends AbstractContentValidator {
private final Schema schema;

@SuppressWarnings("null")
@SuppressWarnings({ "resource", "PMD.UseTryWithResources" })
@NonNull
private static Schema toSchema(@NonNull List<? extends Source> schemaSources) throws IOException {
SchemaFactory schemafactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
// schemafactory.setResourceResolver(new ClasspathResourceResolver());
// TODO verify source input streams are closed
try {
return schemaSources.isEmpty()
return ObjectUtils.notNull(schemaSources.isEmpty()
? schemafactory.newSchema()
: schemafactory.newSchema(schemaSources.toArray(new Source[0]));
: schemafactory.newSchema(schemaSources.toArray(new Source[0])));
} catch (SAXException ex) {
throw new IOException(ex);
} finally {
// Close all source input streams
for (Source source : schemaSources) {
if (source instanceof StreamSource) {
StreamSource streamSource = (StreamSource) source;
if (streamSource.getInputStream() != null) {
streamSource.getInputStream().close();
}
}
}
}
}

Expand Down
53 changes: 2 additions & 51 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>dev.metaschema</groupId>
<artifactId>oss-parent</artifactId>
<version>5</version>
<version>6-SNAPSHOT</version>
</parent>

<groupId>dev.metaschema.java</groupId>
Expand Down Expand Up @@ -57,17 +57,14 @@
<dependency.jdom2.version>2.0.6.1</dependency.jdom2.version>
<dependency.jmock-junit5.version>2.13.1</dependency.jmock-junit5.version>
<dependency.json.version>20240303</dependency.json.version>
<dependency.junit5.version>5.11.3</dependency.junit5.version>
<dependency.log4j2.version>2.24.1</dependency.log4j2.version>
<dependency.logcaptor.version>2.9.3</dependency.logcaptor.version>
<dependency.mokito.version>5.14.2</dependency.mokito.version>
<dependency.moxy.version>4.0.4</dependency.moxy.version>
<dependency.oss-maven.version>${project.parent.version}</dependency.oss-maven.version>
<dependency.plexus-utils.version>4.0.2</dependency.plexus-utils.version>
<dependency.plexus-build-api.version>1.2.0</dependency.plexus-build-api.version>
<dependency.pmd.version>7.7.0</dependency.pmd.version>
<dependency.saxon.version>12.5</dependency.saxon.version>
<dependency.spotbugs-annotations.version>4.8.6</dependency.spotbugs-annotations.version>
<dependency.stax2-api.version>4.2.2</dependency.stax2-api.version>
<dependency.thymeleaf.version>3.1.2.RELEASE</dependency.thymeleaf.version>
<dependency.woodstox.version>7.1.0</dependency.woodstox.version>
Expand All @@ -82,13 +79,7 @@
<plugin.antlr4test.version>1.22</plugin.antlr4test.version>
<plugin.appassembler.version>2.1.0</plugin.appassembler.version>
<plugin.git-commit-id.version>9.0.1</plugin.git-commit-id.version>
<plugin.maven-javadoc.version>3.11.1</plugin.maven-javadoc.version>
<plugin.maven-changes.version>2.12.1</plugin.maven-changes.version>
<plugin.maven-invoker.version>3.8.1</plugin.maven-invoker.version>
<plugin.maven-toolchains.version>3.2.0</plugin.maven-toolchains.version>
<plugin.pmd.version>3.26.0</plugin.pmd.version>
<plugin.spotbugs.version>4.8.6.5</plugin.spotbugs.version>
<plugin.maven-surefire.version>3.5.2</plugin.maven-surefire.version>

<plugin.templating.version>3.0.0</plugin.templating.version>

<argLine>-Xmx1024m</argLine>
Expand Down Expand Up @@ -437,11 +428,6 @@
<artifactId>compiler</artifactId>
<version>2.26ea0</version>
</dependency>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-annotations</artifactId>
<version>${dependency.spotbugs-annotations.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.annotation</artifactId>
Expand All @@ -452,13 +438,6 @@
<artifactId>caffeine</artifactId>
<version>${dependency.caffeine.version}</version>
</dependency>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>${dependency.junit5.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.jmock</groupId>
<artifactId>jmock-junit5</artifactId>
Expand Down Expand Up @@ -500,11 +479,6 @@
<version>${dependency.assertj.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.15.1</version>
</dependency>
<dependency>
<!-- Remove compile warning -->
<groupId>biz.aQute.bnd</groupId>
Expand Down Expand Up @@ -549,7 +523,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-toolchains-plugin</artifactId>
<version>${plugin.maven-toolchains.version}</version>
<executions>
<execution>
<goals>
Expand Down Expand Up @@ -642,7 +615,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<excludes>
<exclude>**/module-info.java</exclude>
Expand All @@ -652,7 +624,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${plugin.maven-javadoc.version}</version>
<configuration>
<excludePackageNames>*.xmlbeans:*.xmlbeans.*:*.antlr</excludePackageNames>
<failOnWarnings>false</failOnWarnings>
Expand All @@ -679,18 +650,12 @@
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>${plugin.spotbugs.version}</version>
<configuration>
<excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
<sarifOutput>true</sarifOutput>
<sarifOutputFilename>spotbugs.sarif</sarifOutputFilename>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<version>${plugin.maven-invoker.version}</version>
</plugin>
<plugin>
<groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
Expand All @@ -714,7 +679,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${plugin.maven-surefire.version}</version>
<configuration>
<forkCount>1.5C</forkCount>
<reuseForks>true</reuseForks>
Expand All @@ -729,19 +693,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>${plugin.pmd.version}</version>
<dependencies>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-core</artifactId>
<version>${dependency.pmd.version}</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-java</artifactId>
<version>${dependency.pmd.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>pmd-verify</id>
Expand Down

0 comments on commit 04bea0d

Please sign in to comment.