Skip to content

Commit

Permalink
feat(JWT-4303)!: Jakarta
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Use Jakarta for XML-Bind instead of Javax
  • Loading branch information
werthdavid committed Jun 18, 2024
1 parent c6a39f5 commit dcf4453
Show file tree
Hide file tree
Showing 20 changed files with 92 additions and 79 deletions.
46 changes: 26 additions & 20 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@

<pdfbox.version>2.0.30</pdfbox.version>

<jaxb-api.version>2.3.1</jaxb-api.version>
<jaxb-runtime.version>2.3.6</jaxb-runtime.version>
<jaxb-api.version>4.0.2</jaxb-api.version>
<jaxb-core.version>4.0.5</jaxb-core.version>
<jaxb-impl.version>4.0.4</jaxb-impl.version>

<!-- testing -->
<junit.version>5.10.2</junit.version>
Expand Down Expand Up @@ -100,7 +101,7 @@
<goal>prepare-agent</goal>
</goals>
<configuration>
<!-- Sets the name of the property containing the settings
<!-- Sets the name of the property containing the settings
for JaCoCo runtime agent. -->
<propertyName>jacocoAgentArgLine</propertyName>
</configuration>
Expand All @@ -120,8 +121,8 @@
<configuration>
<!-- Sets the VM argument line as defined by the JaCoCo plugin. -->
<argLine>${jacocoAgentArgLine}</argLine>
<!-- system properties supplied to maven are not automatically
mapped to surefire test runs. Therefore, we need to specify a manual mapping
<!-- system properties supplied to maven are not automatically
mapped to surefire test runs. Therefore, we need to specify a manual mapping
here. -->
<systemPropertyVariables>
<com.levigo.analyzer.testsuite>${com.levigo.analyzer.testsuite}</com.levigo.analyzer.testsuite>
Expand All @@ -132,7 +133,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.4.1</version>
<version>3.5.0</version>
<dependencies>
<dependency>
<groupId>org.codehaus.mojo</groupId>
Expand All @@ -153,11 +154,11 @@
</requireMavenVersion>
<requireJavaVersion>
<!-- http://maven.apache.org/enforcer/enforcer-rules/versionRanges.html -->
<version>[1.8,18)</version>
<version>[1.8,20)</version>
</requireJavaVersion>
<!-- <requirePluginVersions> <message>Best Practice is to
always define plugin versions!</message> <banLatest>true</banLatest> <banRelease>true</banRelease>
<banSnapshots>true</banSnapshots> <phases>clean,install,deploy,site</phases>
<!-- <requirePluginVersions> <message>Best Practice is to
always define plugin versions!</message> <banLatest>true</banLatest> <banRelease>true</banRelease>
<banSnapshots>true</banSnapshots> <phases>clean,install,deploy,site</phases>
</requirePluginVersions> -->
</rules>
</configuration>
Expand All @@ -171,7 +172,7 @@
<rules>
<banCircularDependencies/>
<enforceBytecodeVersion>
<maxJdkVersion>1.8</maxJdkVersion>
<maxJdkVersion>20</maxJdkVersion>
</enforceBytecodeVersion>
</rules>
</configuration>
Expand All @@ -187,7 +188,7 @@
<password/>
<goals>deploy</goals>
<useReleaseProfile>false</useReleaseProfile>
<!-- use our own profile in case of releases: upload html documentation
<!-- use our own profile in case of releases: upload html documentation
/ enforce relaese env. -->
<autoVersionSubmodules>true</autoVersionSubmodules>
<preparationGoals>clean</preparationGoals>
Expand Down Expand Up @@ -242,7 +243,7 @@
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<!-- <excludePackageNames>*.internal*</excludePackageNames> -->
<!-- the javadoc footer may not contain any newline characters
<!-- the javadoc footer may not contain any newline characters
otherwise the javadoc plugin will fail -->
<footer>
<![CDATA[
Expand All @@ -251,8 +252,8 @@
</footer>
</configuration>
<!-- https://maven.apache.org/plugins/maven-javadoc-plugin/examples/aggregate.html -->
<!-- "Since 3.1.0 the aggregate has changed a little bit. It'll generate
aggregated reports at every level. To get only an aggregated project at root
<!-- "Since 3.1.0 the aggregate has changed a little bit. It'll generate
aggregated reports at every level. To get only an aggregated project at root
level, you need to configure the pom like:" -->
<reportSets>
<reportSet>
Expand Down Expand Up @@ -367,14 +368,19 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>${jaxb-api.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>${jaxb-runtime.version}</version>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>${jaxb-core.version}</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>${jaxb-impl.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/org/jadice/filetype/Analyzer.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
import java.util.Locale;
import java.util.Map;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.ValidationEvent;
import javax.xml.bind.ValidationEventHandler;
import javax.xml.bind.ValidationEventLocator;
import jakarta.xml.bind.JAXBContext;
import jakarta.xml.bind.JAXBException;
import jakarta.xml.bind.Unmarshaller;
import jakarta.xml.bind.ValidationEvent;
import jakarta.xml.bind.ValidationEventHandler;
import jakarta.xml.bind.ValidationEventLocator;

import opennlp.tools.util.model.UncloseableInputStream;
import org.apache.commons.io.FilenameUtils;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jadice/filetype/database/Action.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.jadice.filetype.database;

import javax.xml.bind.annotation.XmlTransient;
import jakarta.xml.bind.annotation.XmlTransient;

import org.jadice.filetype.Context;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jadice/filetype/database/Database.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.jadice.filetype.database;

import javax.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlRootElement;

/**
* This class doesn't add anything to {@link Type}, except for the annotation for the XML
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import java.util.Locale;
import java.util.Map;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlValue;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlValue;

import org.jadice.filetype.Context;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.jadice.filetype.database;

import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlValue;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlValue;

import org.jadice.filetype.Context;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.jadice.filetype.database;

import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlValue;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlValue;

import org.jadice.filetype.Context;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.jadice.filetype.database;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlValue;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlValue;

import org.jadice.filetype.Context;

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/jadice/filetype/database/Type.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import jakarta.xml.bind.annotation.XmlAnyElement;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlTransient;

import org.jadice.filetype.Context;
import org.jadice.filetype.matchers.Matcher;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/jadice/filetype/matchers/ByteMatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import java.io.IOException;
import java.nio.ByteOrder;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlValue;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlValue;

import org.jadice.filetype.Context;
import org.jadice.filetype.database.AbsoluteLocation;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jadice/filetype/matchers/CustomMatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import java.io.EOFException;
import java.io.IOException;

import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlValue;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlValue;

import org.jadice.filetype.Context;
import org.slf4j.Logger;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/jadice/filetype/matchers/DateMatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import java.io.IOException;
import java.nio.ByteOrder;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlValue;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlValue;

import org.jadice.filetype.Context;
import org.jadice.filetype.database.AbsoluteLocation;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/jadice/filetype/matchers/LongMatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import java.io.IOException;
import java.nio.ByteOrder;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlValue;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlValue;

import org.jadice.filetype.Context;
import org.jadice.filetype.database.AbsoluteLocation;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jadice/filetype/matchers/Matcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.io.IOException;

import javax.xml.bind.annotation.XmlTransient;
import jakarta.xml.bind.annotation.XmlTransient;

import org.jadice.filetype.Context;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.nio.ByteOrder;

import javax.xml.bind.annotation.XmlTransient;
import jakarta.xml.bind.annotation.XmlTransient;

/**
* Abstract base class for matchers based on simple numeric data matching.
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/jadice/filetype/matchers/RegexpMatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import java.io.UnsupportedEncodingException;
import java.util.regex.Pattern;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlValue;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlTransient;
import jakarta.xml.bind.annotation.XmlValue;

import org.jadice.filetype.Context;
import org.jadice.filetype.database.AbsoluteLocation;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/jadice/filetype/matchers/ShortMatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import java.io.IOException;
import java.nio.ByteOrder;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlValue;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlValue;

import org.jadice.filetype.Context;
import org.jadice.filetype.database.AbsoluteLocation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.io.IOException;

import javax.xml.bind.annotation.XmlTransient;
import jakarta.xml.bind.annotation.XmlTransient;

import org.jadice.filetype.Context;
import org.jadice.filetype.database.Location;
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/org/jadice/filetype/matchers/StringMatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
import java.nio.charset.Charset;
import java.util.Arrays;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlValue;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlTransient;
import jakarta.xml.bind.annotation.XmlValue;

import org.jadice.filetype.Context;
import org.jadice.filetype.database.AbsoluteLocation;
Expand Down
Loading

0 comments on commit dcf4453

Please sign in to comment.