update to java 11 and jakarta

This commit is contained in:
Mario Melcher 2023-12-13 10:58:35 +01:00
parent 5184f86c5e
commit b659ed9370
12 changed files with 39 additions and 82 deletions

View file

@ -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

View file

@ -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[@]}"

View file

@ -1 +1 @@
-Xms128m -Xmx256m
-Xms1024m -Xmx2048m

View file

@ -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

View file

@ -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-`<version>`.jar**: Java library for embedded use within an application
1. **validationtool-`<version`>-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-`<version`>-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-`<version`>-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

59
pom.xml
View file

@ -21,7 +21,7 @@
<name>KoSIT XML Prüftool Implementierung</name>
<groupId>de.kosit</groupId>
<version>1.5.0</version>
<version>1.6.0</version>
<artifactId>validationtool</artifactId>
<description>KoSIT XML Validator against XSD and Schematron based on defined scenarios.</description>
@ -58,8 +58,8 @@
<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.lombok>1.18.24</version.lombok>
<version.jaxb>4.0.4</version.jaxb>
<version.lombok>1.18.30</version.lombok>
<version.mockito>4.9.0</version.mockito>
<version.owasp-dependency-check>7.2.0</version.owasp-dependency-check>
<version.rest-assured>5.2.0</version.rest-assured>
@ -218,8 +218,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<release>11</release>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
@ -256,44 +255,6 @@
</filters>
</configuration>
</execution>
<execution>
<id>jdk8</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>java8-standalone</shadedClassifierName>
<artifactSet>
<excludes>
<exclude>org.glassfish.jaxb:jaxb-runtime</exclude>
<exclude>com.sun.istack:istack-commons-runtime</exclude>
<exclude>com.sun.xml.fastinfoset:FastInfoset</exclude>
<exclude>jakarta.activation:jakarta.activation-api</exclude>
<exclude>jakarta.xml.bind:jakarta.xml.bind-api</exclude>
<exclude>org.jvnet.staxex:stax-ex</exclude>
<exclude>org.glassfish.jaxb:txw2</exclude>
</excludes>
</artifactSet>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>de.kosit.validationtool.cmd.CommandLineApplication</mainClass>
</transformer>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
<exclude>**/module-info.class</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
@ -323,9 +284,9 @@
<!-- Generate model classes -->
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.15.1</version>
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb-maven-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<goals>
@ -343,9 +304,9 @@
</args>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics</artifactId>
<version>0.11.1</version>
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb-plugins</artifactId>
<version>3.0.1</version>
</plugin>
</plugins>
</configuration>

View file

@ -20,8 +20,8 @@ import java.util.ArrayList;
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;

View file

@ -24,14 +24,14 @@ import java.util.Arrays;
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;

View file

@ -21,7 +21,7 @@ import static org.apache.commons.lang3.StringUtils.defaultIfBlank;
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 @@ import net.sf.saxon.om.TreeInfo;
* <ul>
* <li>{@link StreamSource} - both {@link java.io.InputStream} based and {@link java.io.Reader} based</li>
* <li>{@link javax.xml.transform.dom.DOMSource}</li>
* <li>{@link javax.xml.bind.util.JAXBSource}</li>
* <li>{@link jakarta.xml.bind.util.JAXBSource}</li>
* <li>{@link TreeInfo}</li>
* </ul>
*

View file

@ -20,9 +20,9 @@ import java.io.IOException;
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;

View file

@ -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<String, String> {

View file

@ -18,10 +18,10 @@
<jaxb:bindings
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:inheritance="http://jaxb2-commons.dev.java.net/basic/inheritance"
xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
xmlns:inheritance="urn:jaxb.jvnet.org:plugin:inheritance"
jaxb:extensionBindingPrefixes="inheritance"
version="2.1">
version="3.0">
<jaxb:globalBindings>
<xjc:serializable uid="-1" />
<xjc:javaType