diff --git a/gson/pom.xml b/gson/pom.xml index daf43ac480..4a35e97145 100644 --- a/gson/pom.xml +++ b/gson/pom.xml @@ -147,7 +147,7 @@ -exportcontents:\ com.google.gson,\ - com.google.gson.annotations,\ + com.google.gson.annotations;-noimport:=true,\ com.google.gson.reflect,\ com.google.gson.stream ]]> diff --git a/gson/src/test/java/com/google/gson/regression/OSGiTest.java b/gson/src/test/java/com/google/gson/regression/OSGiTest.java index 29ff39b8dd..475f3e27bb 100644 --- a/gson/src/test/java/com/google/gson/regression/OSGiTest.java +++ b/gson/src/test/java/com/google/gson/regression/OSGiTest.java @@ -34,9 +34,9 @@ public void testComGoogleGsonAnnotationsPackage() throws Exception { Manifest mf = findManifest("com.google.gson"); String importPkg = mf.getMainAttributes().getValue("Import-Package"); assertWithMessage("Import-Package statement is there").that(importPkg).isNotNull(); - assertWithMessage("There should be com.google.gson.annotations dependency") + assertWithMessage("There should be no com.google.gson.annotations dependency") .that(importPkg) - .contains("com.google.gson.annotations"); + .doesNotContain("com.google.gson.annotations"); } @Test