Dependency Updates

This commit is contained in:
apenski 2022-11-09 11:20:47 +01:00
parent b244f73d3a
commit d019642ba5
3 changed files with 76 additions and 70 deletions

View file

@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
removed. removed.
- [INTERNAL] Bump [Saxon HE](https://www.saxonica.com/documentation11/documentation.xml) to 11.4 - [INTERNAL] Bump [Saxon HE](https://www.saxonica.com/documentation11/documentation.xml) to 11.4
- [INTERNAL] Bump [jaxb-ri](https://github.com/eclipse-ee4j/jaxb-ri) to 2.3.7 - [INTERNAL] Bump [jaxb-ri](https://github.com/eclipse-ee4j/jaxb-ri) to 2.3.7
- (CORE) Various other dependency updates. See pom.xml
- [INTERNAL] CLI parsing based on pico-cli, commons-cli is removed - [INTERNAL] CLI parsing based on pico-cli, commons-cli is removed

43
pom.xml
View file

@ -54,9 +54,14 @@
</developers> </developers>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.jacoco>0.8.7</version.jacoco> <version.assertj>3.23.1</version.assertj>
<version.commons-io>2.11.0</version.commons-io>
<version.commons-lang>3.12.0</version.commons-lang>
<version.jacoco>0.8.8</version.jacoco>
<version.jaxb>2.3.7</version.jaxb> <version.jaxb>2.3.7</version.jaxb>
<version.lombok>1.18.20</version.lombok> <version.lombok>1.18.24</version.lombok>
<version.mockito>4.8.1</version.mockito>
<version.rest-assured>5.2.0</version.rest-assured>
<version.saxon-he>11.4</version.saxon-he> <version.saxon-he>11.4</version.saxon-he>
<version.slf4j>1.7.25</version.slf4j> <version.slf4j>1.7.25</version.slf4j>
</properties> </properties>
@ -95,7 +100,7 @@
<dependency> <dependency>
<groupId>org.fusesource.jansi</groupId> <groupId>org.fusesource.jansi</groupId>
<artifactId>jansi</artifactId> <artifactId>jansi</artifactId>
<version>1.18</version> <version>2.4.0</version>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
@ -108,7 +113,7 @@
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId> <artifactId>commons-lang3</artifactId>
<version>3.10</version> <version>${version.commons-lang}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.glassfish.jaxb</groupId> <groupId>org.glassfish.jaxb</groupId>
@ -119,7 +124,7 @@
<dependency> <dependency>
<groupId>org.assertj</groupId> <groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId> <artifactId>assertj-core</artifactId>
<version>3.16.1</version> <version>${version.assertj}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
@ -131,7 +136,7 @@
<dependency> <dependency>
<groupId>commons-io</groupId> <groupId>commons-io</groupId>
<artifactId>commons-io</artifactId> <artifactId>commons-io</artifactId>
<version>2.7</version> <version>${version.commons-io}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.rest-assured</groupId> <groupId>io.rest-assured</groupId>
@ -142,7 +147,7 @@
<dependency> <dependency>
<groupId>org.mockito</groupId> <groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId> <artifactId>mockito-core</artifactId>
<version>3.3.3</version> <version>${version.mockito}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
@ -170,7 +175,7 @@
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId> <artifactId>build-helper-maven-plugin</artifactId>
<version>3.1.0</version> <version>3.3.0</version>
<executions> <executions>
<execution> <execution>
<id>reserve-network-port</id> <id>reserve-network-port</id>
@ -190,7 +195,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId> <artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M2</version> <version>3.1.0</version>
<executions> <executions>
<execution> <execution>
<id>enforce-versions</id> <id>enforce-versions</id>
@ -210,7 +215,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version> <version>3.10.1</version>
<configuration> <configuration>
<source>1.8</source> <source>1.8</source>
<target>1.8</target> <target>1.8</target>
@ -221,7 +226,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId> <artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version> <version>3.4.1</version>
<executions> <executions>
<execution> <execution>
<id>jdk11+</id> <id>jdk11+</id>
@ -294,7 +299,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId> <artifactId>maven-assembly-plugin</artifactId>
<version>3.1.1</version> <version>3.4.2</version>
<executions> <executions>
<execution> <execution>
<id>full_dist</id> <id>full_dist</id>
@ -319,7 +324,7 @@
<plugin> <plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId> <groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId> <artifactId>maven-jaxb2-plugin</artifactId>
<version>0.14.0</version> <version>0.15.1</version>
<executions> <executions>
<execution> <execution>
<goals> <goals>
@ -412,7 +417,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version> <version>3.0.0-M7</version>
<configuration> <configuration>
<!--suppress MavenModelInspection --> <!--suppress MavenModelInspection -->
<argLine>-Dfile.encoding=UTF-8 ${jacocoSurefire}</argLine> <argLine>-Dfile.encoding=UTF-8 ${jacocoSurefire}</argLine>
@ -422,7 +427,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId> <artifactId>maven-source-plugin</artifactId>
<version>3.1.0</version> <version>3.2.1</version>
<executions> <executions>
<execution> <execution>
<id>attach-sources</id> <id>attach-sources</id>
@ -445,7 +450,7 @@
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId> <artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version> <version>3.1.0</version>
<executions> <executions>
<execution> <execution>
<id>run</id> <id>run</id>
@ -482,7 +487,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId> <artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version> <version>3.1.0</version>
<configuration> <configuration>
<target> <target>
<!-- schlafen um den Start des Daemon abzuwarten --> <!-- schlafen um den Start des Daemon abzuwarten -->
@ -503,7 +508,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId> <artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.1</version> <version>3.0.0-M7</version>
<executions> <executions>
<execution> <execution>
<id>test-it</id> <id>test-it</id>
@ -522,7 +527,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version> <version>3.4.1</version>
<configuration> <configuration>
<source>8</source> <source>8</source>
<doclint>none</doclint> <doclint>none</doclint>

View file

@ -61,6 +61,56 @@ class InternalCheck extends DefaultCheck {
super(processor, configuration); super(processor, configuration);
} }
private static String createStatusLine(final Map<String, Result> results) {
final long acceptable = results.entrySet().stream().filter(e -> e.getValue().isAcceptable()).count();
final long rejected = results.entrySet().stream().filter(e -> !e.getValue().isAcceptable()).count();
final long errors = results.entrySet().stream().filter(e -> !e.getValue().isProcessingSuccessful()).count();
final Line line = new Line();
line.add("Acceptable: ").add(acceptable, Code.GREEN);
line.add(" Rejected: ").add(rejected, Code.RED);
if (errors > 0) {
line.add(" Processing errors: ").add(errors, Code.RED);
}
return line.render(true, false);
}
private static Grid createResultGrid(final Map<String, Result> results) {
final Grid grid = new Grid(
//@formatter:off
new ColumnDefinition("File", 60, 10, 1),
new ColumnDefinition("Schema", 7).justify(Justify.CENTER),
new ColumnDefinition("Schematron", 10).justify(Justify.CENTER),
new ColumnDefinition("Acceptance", 10, 5).justify(Justify.CENTER),
new ColumnDefinition("Error/Description", 60,20,3)
);
//@formatter:on
results.entrySet().stream().sorted(Entry.comparingByKey()).forEach(e -> {
final Result value = e.getValue();
final Code textcolor = value.isAcceptable() ? Code.GREEN : Code.RED;
grid.addCell(e.getKey(), textcolor);
grid.addCell(value.isSchemaValid() ? "Y" : "N", textcolor);
grid.addCell(value.isSchematronValid() ? "Y" : "N", textcolor);
grid.addCell(value.getAcceptRecommendation(), textcolor);
grid.addCell(joinErrors(value));
});
return grid;
}
private static String joinErrors(final Result value) {
final StringBuilder b = new StringBuilder();
b.append(String.join(";", value.getProcessingErrors()));
if (value.getSchemaViolations() != null && !value.getSchemaViolations().isEmpty()) {
b.append(b.length() > 0 ? ";" : "");
b.append(value.getSchemaViolations().stream().map(XmlError::getMessage).collect(Collectors.joining(";")));
}
if (value.getSchematronResult() != null && !value.getSchematronResult().isEmpty()) {
b.append(b.length() > 0 ? ";" : "");
b.append(value.getSchematronResult().stream().flatMap(e -> e.getMessages().stream()).collect(Collectors.joining(";")));
}
return b.toString();
}
/** /**
* Prüft die Prüflinge und gibt Informationen über etwaige Assertions aus. * Prüft die Prüflinge und gibt Informationen über etwaige Assertions aus.
* *
@ -114,54 +164,4 @@ class InternalCheck extends DefaultCheck {
return (int) (this.failedAssertions + results.values().stream().filter(e -> !e.isAcceptable()).count()); return (int) (this.failedAssertions + results.values().stream().filter(e -> !e.isAcceptable()).count());
} }
private static String createStatusLine(final Map<String, Result> results) {
final long acceptable = results.entrySet().stream().filter(e -> e.getValue().isAcceptable()).count();
final long rejected = results.entrySet().stream().filter(e -> !e.getValue().isAcceptable()).count();
final long errors = results.entrySet().stream().filter(e -> !e.getValue().isProcessingSuccessful()).count();
final Line line = new Line();
line.add("Acceptable: ").add(acceptable, Code.GREEN);
line.add(" Rejected: ").add(rejected, Code.RED);
if (errors > 0) {
line.add(" Processing errors: ").add(errors, Code.RED);
}
return line.render(true, false);
}
private static Grid createResultGrid(final Map<String, Result> results) {
final Grid grid = new Grid(
//@formatter:off
new ColumnDefinition("filename", 60, 10, 1),
new ColumnDefinition("Schema", 7).justify(Justify.CENTER),
new ColumnDefinition("Schematron", 10).justify(Justify.CENTER),
new ColumnDefinition("Acceptance", 10, 5).justify(Justify.CENTER),
new ColumnDefinition("Error/Description", 60,20,3)
);
//@formatter:on
results.entrySet().stream().sorted(Entry.comparingByKey()).forEach(e -> {
final Result value = e.getValue();
final Code textcolor = value.isAcceptable() ? Code.GREEN : Code.RED;
grid.addCell(e.getKey(), textcolor);
grid.addCell(value.isSchemaValid() ? "Y" : "N", textcolor);
grid.addCell(value.isSchematronValid() ? "Y" : "N", textcolor);
grid.addCell(value.getAcceptRecommendation(), textcolor);
grid.addCell(joinErrors(value));
});
return grid;
}
private static String joinErrors(final Result value) {
final StringBuilder b = new StringBuilder();
b.append(String.join(";", value.getProcessingErrors()));
if (value.getSchemaViolations() != null && !value.getSchemaViolations().isEmpty()) {
b.append(b.length() > 0 ? ";" : "");
b.append(value.getSchemaViolations().stream().map(XmlError::getMessage).collect(Collectors.joining(";")));
}
if (value.getSchematronResult() != null && !value.getSchematronResult().isEmpty()) {
b.append(b.length() > 0 ? ";" : "");
b.append(value.getSchematronResult().stream().flatMap(e -> e.getMessages().stream()).collect(Collectors.joining(";")));
}
return b.toString();
}
} }