[JAVA-18198] (#13592)

* [JAVA-18198] Moved spring-jersey module to jdk9-and-above profile

* [JAVA-18141] Moved jersey module to jdk9-and-above profile

* [JAVA-18140] Moved jaxb module to jdk9-and-above profile

---------

Co-authored-by: Dhawal Kapil <dhawalkapil@gmail.com>
This commit is contained in:
panos-kakos 2023-03-09 17:05:15 +02:00 committed by GitHub
parent ebdd42e3fb
commit e196af6430
20 changed files with 67 additions and 56 deletions

View File

@ -25,6 +25,11 @@
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>${jaxb-runtime.version}</version>
</dependency>
</dependencies>
<build>
@ -97,8 +102,9 @@
<properties>
<!-- maven plugins -->
<jaxb2-maven-plugin.version>2.3</jaxb2-maven-plugin.version>
<jaxb2-maven-plugin.version>3.1.0</jaxb2-maven-plugin.version>
<lifecycle-mapping-plugin.version>1.0.0</lifecycle-mapping-plugin.version>
<jaxb-runtime.version>4.0.0</jaxb-runtime.version>
</properties>
</project>

View File

@ -2,11 +2,11 @@ package com.baeldung.jaxb;
import java.util.Date;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlTransient;
import jakarta.xml.bind.annotation.XmlType;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

View File

@ -4,7 +4,7 @@ import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.xml.bind.annotation.adapters.XmlAdapter;
import jakarta.xml.bind.annotation.adapters.XmlAdapter;
public class DateAdapter extends XmlAdapter<String, Date> {

View File

@ -1,9 +1,11 @@
package com.baeldung.jaxb.dateunmarshalling;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.datatype.XMLGregorianCalendar;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "book")
public class Book {

View File

@ -1,8 +1,8 @@
package com.baeldung.jaxb.dateunmarshalling;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.Date;
@XmlRootElement(name = "book")

View File

@ -1,8 +1,8 @@
package com.baeldung.jaxb.dateunmarshalling;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.time.LocalDateTime;
@XmlRootElement(name = "book")

View File

@ -1,6 +1,6 @@
package com.baeldung.jaxb.dateunmarshalling;
import javax.xml.bind.annotation.adapters.XmlAdapter;
import jakarta.xml.bind.annotation.adapters.XmlAdapter;
import java.text.SimpleDateFormat;
import java.util.Date;

View File

@ -1,8 +1,8 @@
package com.baeldung.jaxb.dateunmarshalling;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import jakarta.xml.bind.JAXBContext;
import jakarta.xml.bind.JAXBException;
import jakarta.xml.bind.Unmarshaller;
import java.io.InputStream;
public class JaxbDateUnmarshalling {

View File

@ -1,6 +1,6 @@
package com.baeldung.jaxb.dateunmarshalling;
import javax.xml.bind.annotation.adapters.XmlAdapter;
import jakarta.xml.bind.annotation.adapters.XmlAdapter;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

View File

@ -1,7 +1,7 @@
package com.baeldung.jaxb.gen;
import javax.xml.bind.annotation.XmlRegistry;
import jakarta.xml.bind.annotation.XmlRegistry;
/**

View File

@ -2,11 +2,11 @@
package com.baeldung.jaxb.gen;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlType;
/**

View File

@ -3,13 +3,13 @@ package com.baeldung.jaxb.gen;
import java.io.Serializable;
import java.util.Calendar;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlSchemaType;
import jakarta.xml.bind.annotation.XmlType;
import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.w3._2001.xmlschema.Adapter1;

View File

@ -1,2 +1,2 @@
@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.baeldung.com/jaxb/gen", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
@jakarta.xml.bind.annotation.XmlSchema(namespace = "http://www.baeldung.com/jaxb/gen", elementFormDefault = jakarta.xml.bind.annotation.XmlNsForm.QUALIFIED)
package com.baeldung.jaxb.gen;

View File

@ -2,7 +2,7 @@
package org.w3._2001.xmlschema;
import java.util.Calendar;
import javax.xml.bind.annotation.adapters.XmlAdapter;
import jakarta.xml.bind.annotation.adapters.XmlAdapter;
public class Adapter1
extends XmlAdapter<String, Calendar>
@ -10,14 +10,14 @@ public class Adapter1
public Calendar unmarshal(String value) {
return (javax.xml.bind.DatatypeConverter.parseDateTime(value));
return (jakarta.xml.bind.DatatypeConverter.parseDateTime(value));
}
public String marshal(Calendar value) {
if (value == null) {
return null;
}
return (javax.xml.bind.DatatypeConverter.printDateTime(value));
return (jakarta.xml.bind.DatatypeConverter.printDateTime(value));
}
}

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<jaxb:bindings version="2.0" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
<jaxb:bindings version="3.0" xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" xmlns:xs="http://www.w3.org/2001/XMLSchema"
jaxb:extensionBindingPrefixes="xjc">
@ -7,7 +7,7 @@
<xjc:simple />
<xjc:serializable uid="-1" />
<jaxb:javaType name="java.util.Calendar" xmlType="xs:dateTime"
parseMethod="javax.xml.bind.DatatypeConverter.parseDateTime"
printMethod="javax.xml.bind.DatatypeConverter.printDateTime" />
parseMethod="jakarta.xml.bind.DatatypeConverter.parseDateTime"
printMethod="jakarta.xml.bind.DatatypeConverter.printDateTime" />
</jaxb:globalBindings>
</jaxb:bindings>

View File

@ -2,7 +2,7 @@ package com.baeldung.jaxb.dateunmarshalling;
import org.junit.Test;
import javax.xml.bind.JAXBException;
import jakarta.xml.bind.JAXBException;
import javax.xml.datatype.DatatypeConfigurationException;
import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar;

View File

@ -6,10 +6,10 @@ import java.io.IOException;
import java.util.Date;
import java.util.TimeZone;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;
import jakarta.xml.bind.JAXBContext;
import jakarta.xml.bind.JAXBException;
import jakarta.xml.bind.Marshaller;
import jakarta.xml.bind.Unmarshaller;
import org.apache.commons.io.FileUtils;
import org.junit.Assert;

View File

@ -101,6 +101,7 @@
<properties>
<jersey.version>2.38</jersey.version>
<maven-war-plugin.version>3.3.2</maven-war-plugin.version>
</properties>
</project>

23
pom.xml
View File

@ -352,8 +352,6 @@
<module>java-jdi</module>
<module>java-websocket</module>
<module>jaxb</module>
<module>jersey</module>
<module>jhipster-5</module>
<module>jmh</module>
@ -441,8 +439,10 @@
<module>spring-di</module>
<module>spring-di-2</module>
<module>spring-ejb-modules</module>
<module>spring-exceptions</module>
<module>spring-integration</module>
<module>spring-jenkins-pipeline</module>
<module>spring-jersey</module>
<module>spring-jinq</module>
<module>spring-katharsis</module>
<module>spring-mobile</module>
@ -578,8 +578,6 @@
<module>java-jdi</module>
<module>java-websocket</module>
<module>jaxb</module>
<module>jersey</module>
<module>jhipster-5</module>
<module>jmh</module>
@ -658,8 +656,9 @@
<module>spring-di</module>
<module>spring-di-2</module>
<module>spring-ejb-modules</module>
<module>spring-jersey</module>
<module>spring-exceptions</module>
<module>spring-integration</module>
<module>spring-jenkins-pipeline</module>
<module>spring-jinq</module>
<module>spring-katharsis</module>
<module>spring-mobile</module>
@ -797,9 +796,10 @@
</build>
<modules>
<module>spring-jersey</module>
<module>jersey</module>
<module>jaxb</module>
<module>javafx</module>
<module>spring-batch</module>
<module>spring-boot-rest</module>
<module>spring-drools</module>
@ -1054,9 +1054,10 @@
</build>
<modules>
<module>spring-jersey</module>
<module>jersey</module>
<module>jaxb</module>
<module>javafx</module>
<module>spring-batch</module>
<module>spring-boot-rest</module>
<module>spring-drools</module>

View File

@ -221,6 +221,7 @@
<httpclient.version>4.5.5</httpclient.version>
<wiremock.version>2.27.2</wiremock.version>
<spring-boot.version>1.5.10.RELEASE</spring-boot.version>
<maven-war-plugin.version>3.3.2</maven-war-plugin.version>
</properties>
</project>