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

upgrade to jakarta.xml.bind 4.0.0 #170

Open
wants to merge 1 commit into
base: master
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
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: java

jdk:
- openjdk8
- oraclejdk11
- openjdk11

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ To use latest release based on **Java Time API** and **Threeten-Extra library**
```

## 0.6 Branch planned
Planning to replace usage of JAXB with JiBX/XStream

moved to jakarta.xml.* instead of javax.xml

## License

Expand Down
57 changes: 5 additions & 52 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<groupId>de.jollyday</groupId>
<artifactId>jollyday</artifactId>
<name>Jollyday</name>
<version>0.5.11-SNAPSHOT</version>
<version>0.6.0-SNAPSHOT</version>
<description>
This API determines the holidays for a given year, country/name and eventually state/region. The holiday data is
stored in XML files (one for each country) and will be read from the classpath. You can provide your own holiday
Expand Down Expand Up @@ -101,7 +101,7 @@
<plugin>
<groupId>com.github.davidmoten</groupId>
<artifactId>jax-maven-plugin</artifactId>
<version>0.1.5</version>
<version>0.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -206,7 +206,7 @@
<argument>-d</argument>
<argument>${project.build.directory}/generated-sources/jaxb</argument>
<argument>-target</argument>
<argument>2.1</argument>
<argument>3.0</argument>
<argument>-p</argument>
<argument>de.jollyday.config</argument>
<argument>${project.basedir}/src/main/xsd/Holiday.xsd</argument>
Expand Down Expand Up @@ -337,31 +337,6 @@
</plugins>
</build>
</profile>
<profile>
<id>jdk9</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>@{argLine}
--add-opens de.jollyday/de.jollyday.config=java.xml.bind
--add-opens de.jollyday/de.jollyday.configuration=ALL-UNNAMED
--add-opens de.jollyday/de.jollyday.datasource.impl=ALL-UNNAMED
--add-opens de.jollyday/de.jollyday.util=ALL-UNNAMED
--add-opens de.jollyday/holidays=ALL-UNNAMED</argLine>
<additionalClasspathElements>
<additionalClasspathElement>${project.basedir}/src/main/resources</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jdk11</id>
<activation>
Expand All @@ -384,37 +359,15 @@
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>2.3.3</version>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.4</version>
<version>4.0.1</version>
</dependency>
</dependencies>
</profile>
<profile>
<id>jdk1</id>
<activation>
<jdk>(,1.8]</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<dependency>
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/de/jollyday/util/XMLUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
import de.jollyday.config.ObjectFactory;
import de.jollyday.config.Weekday;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import jakarta.xml.bind.JAXBContext;
import jakarta.xml.bind.JAXBElement;
import jakarta.xml.bind.JAXBException;
import jakarta.xml.bind.Unmarshaller;
import java.io.InputStream;
import java.time.DayOfWeek;
import java.util.logging.Logger;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module de.jollyday {
requires java.logging;
requires java.xml.bind;
requires jakarta.xml.bind;
opens de.jollyday.config to jakarta.xml.bind;
requires java.desktop;

requires org.threeten.extra;
Expand Down
8 changes: 4 additions & 4 deletions src/test/java/de/jollyday/util/XMLUtilTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import jakarta.xml.bind.JAXBContext;
import jakarta.xml.bind.JAXBElement;
import jakarta.xml.bind.JAXBException;
import jakarta.xml.bind.Unmarshaller;
import java.io.IOException;
import java.io.InputStream;

Expand Down