diff --git a/bundles/jaxrs-ri/pom.xml b/bundles/jaxrs-ri/pom.xml
index c78f2a78ecd..7fe3a16914d 100644
--- a/bundles/jaxrs-ri/pom.xml
+++ b/bundles/jaxrs-ri/pom.xml
@@ -168,7 +168,6 @@
javax.xml.bind
jaxb-api
- provided
javax.annotation
diff --git a/examples/extended-wadl-webapp/pom.xml b/examples/extended-wadl-webapp/pom.xml
index 4c14f2ed268..abf68cd0a36 100644
--- a/examples/extended-wadl-webapp/pom.xml
+++ b/examples/extended-wadl-webapp/pom.xml
@@ -122,6 +122,12 @@
javassist
test
+
+
+ com.sun.xml.bind
+ jaxb-osgi
+ test
+
diff --git a/examples/extended-wadl-webapp/src/test/java/org/glassfish/jersey/examples/extendedwadl/ExtendedWadlWebappOsgiTest.java b/examples/extended-wadl-webapp/src/test/java/org/glassfish/jersey/examples/extendedwadl/ExtendedWadlWebappOsgiTest.java
index 2853bf81822..7c58b8538fd 100644
--- a/examples/extended-wadl-webapp/src/test/java/org/glassfish/jersey/examples/extendedwadl/ExtendedWadlWebappOsgiTest.java
+++ b/examples/extended-wadl-webapp/src/test/java/org/glassfish/jersey/examples/extendedwadl/ExtendedWadlWebappOsgiTest.java
@@ -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(),
@@ -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()
diff --git a/examples/json-with-padding/pom.xml b/examples/json-with-padding/pom.xml
index dc814a3a646..28ef7fc8680 100644
--- a/examples/json-with-padding/pom.xml
+++ b/examples/json-with-padding/pom.xml
@@ -43,7 +43,7 @@
com.sun.xml.bind
- jaxb-impl
+ jaxb-osgi
diff --git a/examples/osgi-helloworld-webapp/functional-test/pom.xml b/examples/osgi-helloworld-webapp/functional-test/pom.xml
index de4aeafc92e..005897b14f2 100644
--- a/examples/osgi-helloworld-webapp/functional-test/pom.xml
+++ b/examples/osgi-helloworld-webapp/functional-test/pom.xml
@@ -137,6 +137,11 @@
org.apache.felix.framework.security
test
+
+ com.sun.xml.bind
+ jaxb-osgi
+ test
+
org.slf4j
diff --git a/tests/osgi/functional/src/test/java/org/glassfish/jersey/osgi/test/basic/AbstractJsonOsgiIntegrationTest.java b/tests/osgi/functional/src/test/java/org/glassfish/jersey/osgi/test/basic/AbstractJsonOsgiIntegrationTest.java
index 7d3a5dcc2ec..cf3f3e732d8 100644
--- a/tests/osgi/functional/src/test/java/org/glassfish/jersey/osgi/test/basic/AbstractJsonOsgiIntegrationTest.java
+++ b/tests/osgi/functional/src/test/java/org/glassfish/jersey/osgi/test/basic/AbstractJsonOsgiIntegrationTest.java
@@ -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);
diff --git a/tests/osgi/functional/src/test/java/org/glassfish/jersey/osgi/test/basic/JaxRsRiBundleTest.java b/tests/osgi/functional/src/test/java/org/glassfish/jersey/osgi/test/basic/JaxRsRiBundleTest.java
index 34c997749ca..6ee0ec8d843 100644
--- a/tests/osgi/functional/src/test/java/org/glassfish/jersey/osgi/test/basic/JaxRsRiBundleTest.java
+++ b/tests/osgi/functional/src/test/java/org/glassfish/jersey/osgi/test/basic/JaxRsRiBundleTest.java
@@ -54,7 +54,7 @@ public class JaxRsRiBundleTest {
@Configuration
public static Option[] configuration() {
- List