Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to java 11 and jakarta (issue #105) #126

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion .mvn/createBuildImages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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[@]}"
Expand Down
2 changes: 1 addition & 1 deletion .mvn/jvm.config
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-Xms128m -Xmx256m
-Xms1024m -Xmx2048m
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 10 additions & 49 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>

Expand Down Expand Up @@ -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>
Expand All @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -43,7 +43,7 @@
* <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>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {

Expand Down
6 changes: 3 additions & 3 deletions src/main/model/binding/global.xjb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down