Skip to content

Commit

Permalink
Merge pull request payara#3961 from senivam/EE4J_8
Browse files Browse the repository at this point in the history
Jersey dependencies version upgrade (part II)
  • Loading branch information
senivam authored Oct 10, 2018
2 parents a2093a0 + 41faccf commit c23b05a
Show file tree
Hide file tree
Showing 16 changed files with 103 additions and 31 deletions.
1 change: 0 additions & 1 deletion bundles/jaxrs-ri/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
Expand Down
6 changes: 6 additions & 0 deletions examples/extended-wadl-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@
<artifactId>javassist</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-osgi</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,6 @@ public static Option[] configuration() {
mavenBundle().groupId("org.glassfish.hk2.external").artifactId("aopalliance-repackaged").versionAsInProject(),
mavenBundle().groupId("org.javassist").artifactId("javassist").versionAsInProject(),

// JAX-RS API
mavenBundle().groupId("javax.ws.rs").artifactId("javax.ws.rs-api").versionAsInProject(),

// Jersey bundles
mavenBundle().groupId("org.glassfish.jersey.core").artifactId("jersey-common").versionAsInProject(),
mavenBundle().groupId("org.glassfish.jersey.media").artifactId("jersey-media-jaxb").versionAsInProject(),
mavenBundle().groupId("org.glassfish.jersey.core").artifactId("jersey-server").versionAsInProject(),
mavenBundle().groupId("org.glassfish.jersey.core").artifactId("jersey-client").versionAsInProject(),
mavenBundle().groupId("org.glassfish.jersey.inject").artifactId("jersey-hk2").versionAsInProject(),

// jettison
mavenBundle().groupId("org.codehaus.jettison").artifactId("jettison").versionAsInProject(),

// validation
mavenBundle().groupId("javax.validation").artifactId("validation-api").versionAsInProject(),

Expand All @@ -138,10 +125,32 @@ public static Option[] configuration() {
mavenBundle().groupId("org.glassfish.jersey.containers").artifactId("jersey-container-grizzly2-http")
.versionAsInProject(),

//JAXB-API
mavenBundle().groupId("javax.xml.bind").artifactId("jaxb-api").versionAsInProject(),
//SUN JAXB IMPL OSGI
mavenBundle().groupId("com.sun.xml.bind").artifactId("jaxb-osgi").versionAsInProject().versionAsInProject(),
systemPackage("com.sun.source.tree"),
systemPackage("com.sun.source.util"),


// tinybundles + required dependencies
mavenBundle().groupId("org.ops4j.pax.tinybundles").artifactId("tinybundles").versionAsInProject(),
mavenBundle().groupId("biz.aQute.bnd").artifactId("bndlib").versionAsInProject(),

// JAX-RS API
mavenBundle().groupId("javax.ws.rs").artifactId("javax.ws.rs-api").versionAsInProject(),

// Jersey bundles
mavenBundle().groupId("org.glassfish.jersey.core").artifactId("jersey-common").versionAsInProject(),
mavenBundle().groupId("org.glassfish.jersey.media").artifactId("jersey-media-jaxb").versionAsInProject(),
mavenBundle().groupId("org.glassfish.jersey.core").artifactId("jersey-server").versionAsInProject(),
mavenBundle().groupId("org.glassfish.jersey.core").artifactId("jersey-client").versionAsInProject(),
mavenBundle().groupId("org.glassfish.jersey.inject").artifactId("jersey-hk2").versionAsInProject(),

// jettison
mavenBundle().groupId("org.codehaus.jettison").artifactId("jettison").versionAsInProject(),


// create ad-hoc bundle
provision(
bundle()
Expand Down
2 changes: 1 addition & 1 deletion examples/json-with-padding/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

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

<dependency>
Expand Down
5 changes: 5 additions & 0 deletions examples/osgi-helloworld-webapp/functional-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@
<artifactId>org.apache.felix.framework.security</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-osgi</artifactId>
<scope>test</scope>
</dependency>
<!-- uncomment the following dependency to get ability
to run felix console in the test -->
<!--dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
import static org.ops4j.pax.exam.CoreOptions.junitBundles;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.CoreOptions.options;
import static org.ops4j.pax.exam.CoreOptions.systemPackage;
import static org.ops4j.pax.exam.CoreOptions.systemProperty;

/**
Expand Down Expand Up @@ -142,8 +143,13 @@ public List<Option> genericOsgiOptions() {
mavenBundle().groupId("org.glassfish.hk2.external").artifactId("javax.inject").versionAsInProject(),
mavenBundle().groupId("org.glassfish.hk2.external").artifactId("aopalliance-repackaged").versionAsInProject(),
mavenBundle().groupId("org.javassist").artifactId("javassist").versionAsInProject(),
// JAX-RS API
mavenBundle().groupId("javax.ws.rs").artifactId("javax.ws.rs-api").versionAsInProject(),
//JAXB-API
mavenBundle().groupId("javax.xml.bind").artifactId("jaxb-api").versionAsInProject(),
//SUN JAXB IMPL OSGI
mavenBundle().groupId("com.sun.xml.bind").artifactId("jaxb-osgi").versionAsInProject().versionAsInProject(),
systemPackage("com.sun.source.tree"),
systemPackage("com.sun.source.util"),

// validation - required by jersey-container-servlet-core
mavenBundle().groupId("javax.validation").artifactId("validation-api").versionAsInProject(),
// Jersey bundles
Expand All @@ -153,6 +159,10 @@ public List<Option> genericOsgiOptions() {
mavenBundle().groupId("org.glassfish.jersey.containers").artifactId("jersey-container-servlet-core")
.versionAsInProject(),
mavenBundle().groupId("org.glassfish.jersey.inject").artifactId("jersey-hk2").versionAsInProject(),

// JAX-RS API
mavenBundle().groupId("javax.ws.rs").artifactId("javax.ws.rs-api").versionAsInProject(),

// Those two bundles have different (unique) maven coordinates, but represent the same OSGi bundle in two
// different versions.
// (see the maven bundle plugin configuration in each of the two pom.xml files
Expand Down
6 changes: 6 additions & 0 deletions examples/osgi-http-service/functional-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-osgi</artifactId>
<scope>test</scope>
</dependency>

</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import static org.ops4j.pax.exam.CoreOptions.junitBundles;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.CoreOptions.options;
import static org.ops4j.pax.exam.CoreOptions.systemPackage;
import static org.ops4j.pax.exam.CoreOptions.systemProperty;

/**
Expand Down Expand Up @@ -106,8 +107,12 @@ public List<Option> genericOsgiOptions() {
mavenBundle().groupId("org.glassfish.hk2.external").artifactId("aopalliance-repackaged").versionAsInProject(),
mavenBundle().groupId("org.javassist").artifactId("javassist").versionAsInProject(),

// JAX-RS API
mavenBundle().groupId("javax.ws.rs").artifactId("javax.ws.rs-api").versionAsInProject(),
//JAXB-API
mavenBundle().groupId("javax.xml.bind").artifactId("jaxb-api").versionAsInProject(),
//SUN JAXB IMPL OSGI
mavenBundle().groupId("com.sun.xml.bind").artifactId("jaxb-osgi").versionAsInProject().versionAsInProject(),
systemPackage("com.sun.source.tree"),
systemPackage("com.sun.source.util"),

// validation
mavenBundle().groupId("javax.validation").artifactId("validation-api").versionAsInProject(),
Expand All @@ -118,7 +123,11 @@ public List<Option> genericOsgiOptions() {
mavenBundle().groupId("org.glassfish.jersey.core").artifactId("jersey-client").versionAsInProject(),
mavenBundle().groupId("org.glassfish.jersey.containers").artifactId("jersey-container-servlet-core")
.versionAsInProject(),
mavenBundle().groupId("org.glassfish.jersey.inject").artifactId("jersey-hk2").versionAsInProject()
mavenBundle().groupId("org.glassfish.jersey.inject").artifactId("jersey-hk2").versionAsInProject(),

// JAX-RS API
mavenBundle().groupId("javax.ws.rs").artifactId("javax.ws.rs-api").versionAsInProject()

));

final String localRepository = AccessController.doPrivileged(PropertiesHelper.getSystemProperty("localRepository"));
Expand Down
1 change: 0 additions & 1 deletion media/jaxb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.glassfish.hk2.external</groupId>
Expand Down
12 changes: 8 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.2.0</version>
<version>3.5.0</version>
<extensions>true</extensions>
<configuration>
<instructions>
Expand Down Expand Up @@ -1536,14 +1536,18 @@
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb.api.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>${jaxb.ri.version}</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-osgi</artifactId>
<version>${jaxb.ri.version}</version>
</dependency>

<dependency>
<groupId>org.eclipse.persistence</groupId>
Expand Down Expand Up @@ -1966,8 +1970,8 @@
<javax.interceptor.version>1.2.2</javax.interceptor.version>
<javax.persistence.version>1.0.2</javax.persistence.version>
<javax.validation.api.version>2.0.1.Final</javax.validation.api.version>
<jaxb.api.version>2.2.7</jaxb.api.version>
<jaxb.ri.version>2.2.7</jaxb.ri.version>
<jaxb.api.version>2.3.1</jaxb.api.version>
<jaxb.ri.version>2.3.1</jaxb.ri.version>
<jsonb.api.version>1.0</jsonb.api.version>
<jaxrs.api.spec.version>2.1</jaxrs.api.spec.version>
<jaxrs.api.impl.version>2.1.1</jaxrs.api.impl.version>
Expand Down
11 changes: 11 additions & 0 deletions tests/osgi/functional/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,17 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-osgi</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<scope>test</scope>
</dependency>

<!-- logging -->
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public abstract class AbstractJsonOsgiIntegrationTest {
protected abstract Feature getJsonProviderFeature();

@Test
public void testJson() throws Exception {
public void testJson() {
final Feature jsonProviderFeature = getJsonProviderFeature();
final Client client = ClientBuilder.newClient();
final ResourceConfig resourceConfig = new ResourceConfig(JsonResource.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class JaxRsRiBundleTest {

@Configuration
public static Option[] configuration() {
List<Option> options = Helper.getCommonOsgiOptions(false);
List<Option> options = Helper.getCommonOsgiOptions();

options.addAll(Helper.expandedList(
// vmOption("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.Configuration;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.CoreOptions.systemPackage;

/**
* @author Michal Gajdos
Expand All @@ -41,8 +42,12 @@ public static Option[] configuration() {
options.addAll(Helper.expandedList(
// jersey-json dependencies
mavenBundle().groupId("org.glassfish.jersey.media").artifactId("jersey-media-json-jettison").versionAsInProject(),
mavenBundle().groupId("org.codehaus.jettison").artifactId("jettison").versionAsInProject()
));
mavenBundle().groupId("org.codehaus.jettison").artifactId("jettison").versionAsInProject(),
//SUN JAXB IMPL OSGI
mavenBundle().groupId("com.sun.xml.bind").artifactId("jaxb-osgi").versionAsInProject().versionAsInProject(),
systemPackage("com.sun.source.tree"),
systemPackage("com.sun.source.util")
));

return Helper.asArray(options);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import org.ops4j.pax.exam.junit.PaxExam;
import static org.junit.Assert.assertEquals;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.CoreOptions.systemPackage;

/**
* @author Michal Gajdos
Expand All @@ -69,7 +70,13 @@ public static Option[] configuration() {

options.addAll(Helper.expandedList(
// jersey-multipart dependencies
mavenBundle().groupId("org.glassfish.jersey.ext").artifactId("jersey-proxy-client").versionAsInProject()));
mavenBundle().groupId("org.glassfish.jersey.ext").artifactId("jersey-proxy-client").versionAsInProject(),
//SUN JAXB IMPL OSGI
mavenBundle().groupId("com.sun.xml.bind").artifactId("jaxb-osgi").versionAsInProject().versionAsInProject(),
systemPackage("com.sun.source.tree"),
systemPackage("com.sun.source.util")

));

options = Helper.addPaxExamMavenLocalRepositoryProperty(options);
return Helper.asArray(options);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ public static List<Option> getCommonOsgiOptions(final boolean includeJerseyJaxRs
mavenBundle().groupId("org.glassfish.jersey.core").artifactId("jersey-client").versionAsInProject(),

// Jersey Injection provider
mavenBundle().groupId("org.glassfish.jersey.inject").artifactId("jersey-hk2").versionAsInProject()
mavenBundle().groupId("org.glassfish.jersey.inject").artifactId("jersey-hk2").versionAsInProject(),
// Jaxb - api
mavenBundle().groupId("javax.xml.bind").artifactId("jaxb-api").versionAsInProject().versionAsInProject()
));
}

Expand Down

0 comments on commit c23b05a

Please sign in to comment.