From b659ed9370b70aebbf19f7d2634fc3de21d05693 Mon Sep 17 00:00:00 2001 From: Mario Melcher Date: Wed, 13 Dec 2023 10:58:35 +0100 Subject: [PATCH] update to java 11 and jakarta --- .gitlab-ci.yml | 9 --- .mvn/createBuildImages.sh | 2 +- .mvn/jvm.config | 2 +- CHANGELOG.md | 8 ++- README.md | 3 +- pom.xml | 59 ++++--------------- .../impl/CollectingErrorEventHandler.java | 4 +- .../impl/ConversionService.java | 16 ++--- .../impl/input/SourceInput.java | 4 +- .../impl/tasks/CreateReportAction.java | 6 +- .../impl/xml/StringTrimAdapter.java | 2 +- src/main/model/binding/global.xjb | 6 +- 12 files changed, 39 insertions(+), 82 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f0365aa..f50c732 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -52,18 +52,10 @@ java-11: - target/surefire-reports/*.xml - target/failsafe-reports/*.xml -java8: - extends: .java - image: $CI_REGISTRY_IMAGE/maven:3-jdk-8 - java-11-openj9: extends: .java_extended image: $CI_REGISTRY_IMAGE/maven:3-jdk-11-openj9 -java-8-openj9: - extends: .java_extended - image: $CI_REGISTRY_IMAGE/maven:3-jdk-8-openj9 - java-15: extends: .java_extended image: $CI_REGISTRY_IMAGE/maven:3-openjdk-15 @@ -95,7 +87,6 @@ deploy: - mvn $MAVEN_CLI_OPTS deploy:deploy-file -Dfile=target/validationtool-${PROJECT_VERSION}.jar -DgroupId=kosit -DartifactId=validator -Dversion=${PROJECT_VERSION} -Dpackaging=jar -DrepositoryId="gitlab-maven" -Durl=https://projekte.kosit.org/api/v4/projects/7/packages/maven - mvn $MAVEN_CLI_OPTS deploy:deploy-file -Dfile=target/validationtool-${PROJECT_VERSION}-javadoc.jar -DgroupId=kosit -DartifactId=validator -Dclassifier="javadoc" -Dversion=${PROJECT_VERSION} -Dpackaging=zip -DrepositoryId="gitlab-maven" -Durl=https://projekte.kosit.org/api/v4/projects/7/packages/maven - mvn $MAVEN_CLI_OPTS deploy:deploy-file -Dfile=target/validationtool-${PROJECT_VERSION}-standalone.jar -DgroupId=kosit -DartifactId=validator -Dclassifier="standalone" -Dversion=${PROJECT_VERSION} -Dpackaging=jar -DrepositoryId="gitlab-maven" -Durl=https://projekte.kosit.org/api/v4/projects/7/packages/maven - - mvn $MAVEN_CLI_OPTS deploy:deploy-file -Dfile=target/validationtool-${PROJECT_VERSION}-java8-standalone.jar -DgroupId=kosit -DartifactId=validator -Dclassifier="java8-standalone" -Dversion=${PROJECT_VERSION} -Dpackaging=jar -DrepositoryId="gitlab-maven" -Durl=https://projekte.kosit.org/api/v4/projects/7/packages/maven - mvn $MAVEN_CLI_OPTS deploy:deploy-file -Dfile=target/validationtool-${PROJECT_VERSION}-sources.jar -DgroupId=kosit -DartifactId=validator -Dclassifier="sources" -Dversion=${PROJECT_VERSION} -Dpackaging=jar -DrepositoryId="gitlab-maven" -Durl=https://projekte.kosit.org/api/v4/projects/7/packages/maven when: manual diff --git a/.mvn/createBuildImages.sh b/.mvn/createBuildImages.sh index 1cd5ec7..7cecf37 100644 --- a/.mvn/createBuildImages.sh +++ b/.mvn/createBuildImages.sh @@ -16,7 +16,7 @@ # limitations under the License. # -TAGS=("3-openjdk-16" "3-jdk-11" "3-jdk-11-openj9" "3-jdk-8" "3-jdk-8-openj9" "3-openjdk-15" "3-openjdk-17" "3-openjdk-18" "3-eclipse-temurin-19-alpine") +TAGS=("3-openjdk-16" "3-jdk-11" "3-jdk-11-openj9" "3-openjdk-15" "3-openjdk-17" "3-openjdk-18" "3-eclipse-temurin-19-alpine") docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY" for i in "${TAGS[@]}" diff --git a/.mvn/jvm.config b/.mvn/jvm.config index 883d916..29224f9 100644 --- a/.mvn/jvm.config +++ b/.mvn/jvm.config @@ -1 +1 @@ --Xms128m -Xmx256m \ No newline at end of file +-Xms1024m -Xmx2048m \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index fd7b759..13df1c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -# 1.5.0 (to be released) +# 1.6.0 (to be released) + +### Changed + +- (CORE) update to java 11 and to jakarta namespace + +# 1.5.0 ### Fixed diff --git a/README.md b/README.md index 0fd508e..f980b84 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,5 @@ The [daemon documentation](./docs/daemon.md) shows more usage details and furthe The validator distribution contains the following artifacts: 1. **validationtool-``.jar**: Java library for embedded use within an application -1. **validationtool-`-standalone.jar**: Uber-JAR for standalone usage containing all dependencies in one jar file. This file comes with JAXB *embedded* and can be used with Java 8 and Java >= 11) -1. **validationtool-`-java8-standalone.jar**: Uber-JAR for standalone usage with Java JDK 8 containing all dependencies in one jar file. This file file *does not* contain JAXB and depends on the bundled version of the JDK. +1. **validationtool-`-standalone.jar**: Uber-JAR for standalone usage containing all dependencies in one jar file. This file comes with JAXB *embedded* and can be used with Java >= 11) 1. **libs/***: directory containing all (incl. optional) dependencies of the validator diff --git a/pom.xml b/pom.xml index cd1efac..6bc0601 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ KoSIT XML Prüftool Implementierung de.kosit - 1.5.0 + 1.6.0 validationtool KoSIT XML Validator against XSD and Schematron based on defined scenarios. @@ -58,8 +58,8 @@ 2.11.0 3.12.0 0.8.8 - 2.3.7 - 1.18.24 + 4.0.4 + 1.18.30 4.9.0 7.2.0 5.2.0 @@ -218,8 +218,7 @@ maven-compiler-plugin 3.10.1 - 1.8 - 1.8 + 11 UTF-8 @@ -256,44 +255,6 @@ - - jdk8 - package - - shade - - - true - java8-standalone - - - org.glassfish.jaxb:jaxb-runtime - com.sun.istack:istack-commons-runtime - com.sun.xml.fastinfoset:FastInfoset - jakarta.activation:jakarta.activation-api - jakarta.xml.bind:jakarta.xml.bind-api - org.jvnet.staxex:stax-ex - org.glassfish.jaxb:txw2 - - - - - de.kosit.validationtool.cmd.CommandLineApplication - - - - - *:* - - META-INF/*.SF - META-INF/*.DSA - META-INF/*.RSA - **/module-info.class - - - - - @@ -323,9 +284,9 @@ - org.jvnet.jaxb2.maven2 - maven-jaxb2-plugin - 0.15.1 + org.jvnet.jaxb + jaxb-maven-plugin + 3.0.1 @@ -343,9 +304,9 @@ - org.jvnet.jaxb2_commons - jaxb2-basics - 0.11.1 + org.jvnet.jaxb + jaxb-plugins + 3.0.1 diff --git a/src/main/java/de/kosit/validationtool/impl/CollectingErrorEventHandler.java b/src/main/java/de/kosit/validationtool/impl/CollectingErrorEventHandler.java index 3897006..3f522a6 100644 --- a/src/main/java/de/kosit/validationtool/impl/CollectingErrorEventHandler.java +++ b/src/main/java/de/kosit/validationtool/impl/CollectingErrorEventHandler.java @@ -20,8 +20,8 @@ import java.util.Collection; import java.util.StringJoiner; -import javax.xml.bind.ValidationEvent; -import javax.xml.bind.ValidationEventHandler; +import jakarta.xml.bind.ValidationEvent; +import jakarta.xml.bind.ValidationEventHandler; import javax.xml.transform.ErrorListener; import javax.xml.transform.SourceLocator; import javax.xml.transform.TransformerException; diff --git a/src/main/java/de/kosit/validationtool/impl/ConversionService.java b/src/main/java/de/kosit/validationtool/impl/ConversionService.java index 31e4ff7..d2ca2d2 100644 --- a/src/main/java/de/kosit/validationtool/impl/ConversionService.java +++ b/src/main/java/de/kosit/validationtool/impl/ConversionService.java @@ -24,14 +24,14 @@ import java.util.Collection; import java.util.StringJoiner; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.bind.JAXBIntrospector; -import javax.xml.bind.Marshaller; -import javax.xml.bind.Unmarshaller; -import javax.xml.bind.ValidationEventHandler; -import javax.xml.bind.annotation.XmlRegistry; +import jakarta.xml.bind.JAXBContext; +import jakarta.xml.bind.JAXBElement; +import jakarta.xml.bind.JAXBException; +import jakarta.xml.bind.JAXBIntrospector; +import jakarta.xml.bind.Marshaller; +import jakarta.xml.bind.Unmarshaller; +import jakarta.xml.bind.ValidationEventHandler; +import jakarta.xml.bind.annotation.XmlRegistry; import javax.xml.namespace.QName; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLOutputFactory; diff --git a/src/main/java/de/kosit/validationtool/impl/input/SourceInput.java b/src/main/java/de/kosit/validationtool/impl/input/SourceInput.java index 65cb32d..7b0a9b8 100644 --- a/src/main/java/de/kosit/validationtool/impl/input/SourceInput.java +++ b/src/main/java/de/kosit/validationtool/impl/input/SourceInput.java @@ -21,7 +21,7 @@ import java.io.IOException; import java.nio.charset.Charset; -import javax.xml.bind.util.JAXBSource; +import jakarta.xml.bind.util.JAXBSource; import javax.xml.transform.Source; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamSource; @@ -43,7 +43,7 @@ *
    *
  • {@link StreamSource} - both {@link java.io.InputStream} based and {@link java.io.Reader} based
  • *
  • {@link javax.xml.transform.dom.DOMSource}
  • - *
  • {@link javax.xml.bind.util.JAXBSource}
  • + *
  • {@link jakarta.xml.bind.util.JAXBSource}
  • *
  • {@link TreeInfo}
  • *
* diff --git a/src/main/java/de/kosit/validationtool/impl/tasks/CreateReportAction.java b/src/main/java/de/kosit/validationtool/impl/tasks/CreateReportAction.java index 554a47f..4a5d265 100644 --- a/src/main/java/de/kosit/validationtool/impl/tasks/CreateReportAction.java +++ b/src/main/java/de/kosit/validationtool/impl/tasks/CreateReportAction.java @@ -20,9 +20,9 @@ import java.util.Collection; import java.util.stream.Collectors; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.bind.util.JAXBSource; +import jakarta.xml.bind.JAXBException; +import jakarta.xml.bind.Marshaller; +import jakarta.xml.bind.util.JAXBSource; import org.xml.sax.ContentHandler; import org.xml.sax.DTDHandler; 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 f3c3c25..08ef4b1 100644 --- a/src/main/java/de/kosit/validationtool/impl/xml/StringTrimAdapter.java +++ b/src/main/java/de/kosit/validationtool/impl/xml/StringTrimAdapter.java @@ -16,7 +16,7 @@ package de.kosit.validationtool.impl.xml; -import javax.xml.bind.annotation.adapters.XmlAdapter; +import jakarta.xml.bind.annotation.adapters.XmlAdapter; public class StringTrimAdapter extends XmlAdapter { diff --git a/src/main/model/binding/global.xjb b/src/main/model/binding/global.xjb index 2c85926..f714503 100644 --- a/src/main/model/binding/global.xjb +++ b/src/main/model/binding/global.xjb @@ -18,10 +18,10 @@ + version="3.0">