Skip to content

Commit

Permalink
Update JDK11 Tests to Jakarta Namespace -
Browse files Browse the repository at this point in the history
* Tests the library for JLink, Jakarta JAXB and JaxRS
* Recreates issue FasterXML/jackson-jaxrs-providers#129
* Recreates issue FasterXML/jackson-modules-base#116
  • Loading branch information
GedMarc committed Nov 12, 2020
1 parent 587d413 commit 67fbdeb
Show file tree
Hide file tree
Showing 8 changed files with 168 additions and 128 deletions.
57 changes: 30 additions & 27 deletions JLink/pom.xml
Expand Up @@ -3,17 +3,16 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-bom</artifactId>
<version>2.11.3</version>
<groupId>com.fasterxml.jackson.util</groupId>
<artifactId>jackson-jdk11-compat-test</artifactId>
<version>2.12.0-rc2-SNAPSHOT</version>
</parent>

<artifactId>jackson-jlink</artifactId>
<packaging>jlink</packaging>

<properties>
<enforcer.skip>true</enforcer.skip>
<guicedee.version>0.70.0.6</guicedee.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -78,24 +77,6 @@
</exclusions>
</dependency>

<dependency>
<groupId>com.guicedee.services</groupId>
<artifactId>javax.inject</artifactId>
<version>${guicedee.version}</version>
</dependency>

<dependency>
<groupId>com.guicedee.services</groupId>
<artifactId>guice</artifactId>
<version>${guicedee.version}</version>
</dependency>

<dependency>
<groupId>com.guicedee.services</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>${guicedee.version}</version>
</dependency>

<dependency>
<groupId>com.fasterxml.woodstox</groupId>
<artifactId>woodstox-core</artifactId>
Expand All @@ -105,20 +86,42 @@
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-guava</artifactId>
<version>2.11.3</version>
<exclusions>
<exclusion>
<artifactId>guava</artifactId>
<groupId>com.google.guava</groupId>
</exclusion>
</exclusions>
</dependency>


<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jaxrs</artifactId>
</dependency>


<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>

<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>

<dependency>
<groupId>com.guicedee.services</groupId>
<artifactId>guava</artifactId>
<version>${guicedee.version}</version>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-core</artifactId>
</dependency>

<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
</dependency>


</dependencies>

<build>
Expand All @@ -136,7 +139,7 @@
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>7.2</version> <!-- Use newer version of ASM -->
<version>9.0</version> <!-- Use newer version of ASM -->
</dependency>
</dependencies>
</plugin>
Expand Down
36 changes: 31 additions & 5 deletions jdk11-tests/pom.xml
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.fasterxml.jackson.util</groupId>
<artifactId>jackson-jdk11-compat-test</artifactId>
<version>2.11.0-SNAPSHOT</version>
<version>2.12.0-rc2-SNAPSHOT</version>
</parent>

<artifactId>jdk11-tests</artifactId>
Expand All @@ -16,13 +16,39 @@
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-afterburner</artifactId>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jaxrs</artifactId>
</dependency>


<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>

<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>

<!-- Apache CXF + Jersey JAX-RS Implementation-->
<dependency>
<groupId>com.guicedee.servlets</groupId>
<artifactId>guiced-rest-services</artifactId>
<version>${guicedee.version}</version>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-core</artifactId>
</dependency>

<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
</dependency>

<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
</dependency>


</dependencies>

<build>
Expand Down
@@ -1,6 +1,6 @@
package com.fasterxml.jackson.compat11;

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

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.json.JsonMapper;
Expand Down
@@ -1,9 +1,9 @@
package com.fasterxml.jackson.compat11.jaxrs;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;

@Path("hello")
@Produces("application/json")
Expand Down
@@ -1,6 +1,6 @@
package com.fasterxml.jackson.compat11.testutil;

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

public class JaxbFooWrapper {
@XmlElement(name = "value")
Expand Down
13 changes: 4 additions & 9 deletions jdk11-tests/src/main/java/module-info.java
Expand Up @@ -20,32 +20,27 @@
requires com.fasterxml.jackson.datatype.guava;
//requires com.fasterxml.jackson.dataformat.ion;
requires com.fasterxml.jackson.datatype.joda;
requires com.fasterxml.jackson.jaxrs.json;
requires com.fasterxml.jackson.datatype.jaxrs;

requires static joda.time;

requires com.fasterxml.jackson.module.afterburner;
requires com.google.common;

requires java.xml.bind;
requires jakarta.xml.bind;
// and then some base modules as well

requires com.fasterxml.jackson.module.jaxb;
//requires com.fasterxml.jackson.module.mrbean;

requires com.ctc.wstx;

requires com.google.guice;

//Todo Needs to go static guava, static com.google.common
//requires com.fasterxml.jackson.datatype.guava;
requires com.fasterxml.jackson.module.mrbean;
requires java.net.http;
requires java.logging;
requires com.guicedee.guicedservlets.rest;
requires com.guicedee.guicedservlets.undertow;
requires undertow.core;
requires java.ws.rs;
requires guava;
requires jakarta.ws.rs;

// and finally open up types for tests
exports com.fasterxml.jackson.compat11.testutil;
Expand Down
@@ -1,6 +1,7 @@
package com.fasterxml.jackson.compat11.test.misc;


//GedMarc 2020/11/12 - re-enable after merges done with 2.12rc2
/*
import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
import com.guicedee.guicedservlets.rest.RESTContext;
import com.guicedee.guicedservlets.undertow.GuicedUndertow;
Expand Down Expand Up @@ -49,4 +50,4 @@ public void testConfigureServlets() throws Exception
}
undertow.stop();
}
}
}*/

0 comments on commit 67fbdeb

Please sign in to comment.