From 752ceb228d41a82af0071c74c54ba27a7cc31432 Mon Sep 17 00:00:00 2001 From: Philip Helger Date: Tue, 17 Feb 2026 16:11:11 +0100 Subject: [PATCH] Resolve "Improve provided licenses in standalone JAR (Github 173)" --- .gitignore | 1 + NOTICE | 20 +- pom.xml | 52 ++++++ .../impl/xml/StringTrimAdapter.java | 10 +- src/main/model/binding/global.xjb | 4 +- src/main/resources/LICENSE.validator | 176 ++++++++++++++++++ src/main/resources/app-info.properties | 2 +- src/main/resources/simplelogger.properties | 20 +- src/main/resources/transform/identity.xsl | 7 +- 9 files changed, 257 insertions(+), 35 deletions(-) create mode 100644 src/main/resources/LICENSE.validator diff --git a/.gitignore b/.gitignore index 1f05b8f..23b183e 100644 --- a/.gitignore +++ b/.gitignore @@ -47,6 +47,7 @@ xrechnung .DS_Store andre*-simple.xml somePrefix*.xml +zz # 2.0 stuff api/ diff --git a/NOTICE b/NOTICE index a1ed12f..ea6f0e7 100644 --- a/NOTICE +++ b/NOTICE @@ -1,5 +1,23 @@ KoSIT XML Validator -Copyright 2017-2025 Koordinierungsstelle für IT-Standards (KoSIT) +Copyright 2017-2026 Koordinierungsstelle für IT-Standards (KoSIT) This product includes software developed by Koordinierungsstelle für IT-Standards (). + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). + +This product includes software developed at +Fusesource (http://fusesource.github.io/jansi/). + +This product includes software developed at +Remko Popma (https://picocli.info/). + +This product includes software developed at +Saxonica (https://github.com/Saxonica/Saxon-HE). + +This product includes software developed at +Eclipse Foundation (https://github.com/eclipse-ee4j/jaxb-ri). + +This product includes software developed at +QOS.ch (https://www.slf4j.org/). diff --git a/pom.xml b/pom.xml index b77b5fc..9e6e7f2 100644 --- a/pom.xml +++ b/pom.xml @@ -206,6 +206,33 @@ + + + maven-resources-plugin + 3.4.0 + + + copy-license-notice + process-resources + + copy-resources + + + ${project.build.outputDirectory}/META-INF + + + ${project.basedir} + + NOTICE + + + + true + + + + + org.codehaus.mojo build-helper-maven-plugin @@ -290,14 +317,39 @@ de.kosit.validationtool.cmd.CommandLineApplication + + + + + + + false + *:* + + META-INF/*.MF + META-INF/*.SF META-INF/*.DSA META-INF/*.RSA + **/module-info.class diff --git a/src/main/java/de/kosit/validationtool/impl/xml/StringTrimAdapter.java b/src/main/java/de/kosit/validationtool/impl/xml/StringTrimAdapter.java index 08ef4b1..ca839dd 100644 --- a/src/main/java/de/kosit/validationtool/impl/xml/StringTrimAdapter.java +++ b/src/main/java/de/kosit/validationtool/impl/xml/StringTrimAdapter.java @@ -22,18 +22,12 @@ public class StringTrimAdapter extends XmlAdapter { @Override public String unmarshal(final String v) { - if (v == null) { - return null; - } - return v.trim(); + return trim(v); } @Override public String marshal(final String v) { - if (v == null) { - return null; - } - return v.trim(); + return trim(v); } public static String trim(final String v) { diff --git a/src/main/model/binding/global.xjb b/src/main/model/binding/global.xjb index cd2a512..ae2d603 100644 --- a/src/main/model/binding/global.xjb +++ b/src/main/model/binding/global.xjb @@ -1,6 +1,6 @@ - @@ -24,5 +24,4 @@ - - \ No newline at end of file +