You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2015/03/30 22:02:32 UTC

[4/8] jena git commit: Explicit filter/pattern for com.google.common|thirdparty

Explicit filter/pattern for com.google.common|thirdparty

and revisit OSGi manifest to ensure everything is listed
as the bundle-plugin is run after shading, the
simplest in the end was to copy the relevant
bit from the bundled META-INF/MANIFEST


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/57eacdc1
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/57eacdc1
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/57eacdc1

Branch: refs/heads/master
Commit: 57eacdc11f7db354f0c7f6e8d813c1ca01ad3ec5
Parents: 37446c5
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Mar 23 22:20:45 2015 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Mar 23 22:20:45 2015 +0000

----------------------------------------------------------------------
 jena-shadowed-ext/pom.xml | 41 ++++++++++++++++++++++++++++++++++-------
 1 file changed, 34 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/57eacdc1/jena-shadowed-ext/pom.xml
----------------------------------------------------------------------
diff --git a/jena-shadowed-ext/pom.xml b/jena-shadowed-ext/pom.xml
index 80453e9..dfbc7b4 100644
--- a/jena-shadowed-ext/pom.xml
+++ b/jena-shadowed-ext/pom.xml
@@ -80,10 +80,34 @@
               <artifact>com.google.guava:guava</artifact>
             </includes>
           </artifactSet>
+
+          <filters>
+            <filter>
+              <!-- Modify the below patterns if a later guava contains other
+                   packages -->
+              <artifact>com.google.guava:guava</artifact>
+              <includes>
+                <include>com/google/common/**</include>
+                <include>com/google/thirdparty/**</include>
+              </includes>
+            </filter>
+          </filters>
+
+          <!-- 
+            Shade to a different package, so the JAR we produce will not be
+            in conflict with any newer/older guava present in client code
+            depending on Jena.
+          -->
           <relocations>
+              <!-- Modify the below patterns if a later guava contains other
+                   packages -->
+            <relocation>
+              <pattern>com.google.common</pattern>
+              <shadedPattern>org.apache.jena.ext.com.google.common</shadedPattern>
+            </relocation>
             <relocation>
-              <pattern>com.google</pattern>
-              <shadedPattern>org.apache.jena.ext.com.google</shadedPattern>
+              <pattern>com.google.thirdparty</pattern>
+              <shadedPattern>org.apache.jena.ext.com.google.thirdparty</shadedPattern>
             </relocation>
           </relocations>
         </configuration>
@@ -93,11 +117,14 @@
         <artifactId>maven-bundle-plugin</artifactId>
         <configuration>
           <instructions>
-            <Export-Package>!org.apache.jena.ext.com.google.common.base.internal,org.apache.jena.ext.*</Export-Package>
-            <Import-Package>
-              javax.annotation;resolution:=optional,
-              sun.misc.*;resolution:=optional
-            </Import-Package>
+<!-- From META-INF/MANIFEST.MF of
+http://central.maven.org/maven2/com/google/guava/guava/18.0/guava-18.0.jar
+Update below if a newer guava is used
+-->
+
+            <Export-Package>org.apache.jena.ext.com.google.common.net;uses:="javax.annotation,org.apache.jena.ext.com.google.common.base,org.apache.jena.ext.com.google.common.hash,org.apache.jena.ext.com.google.common.io,org.apache.jena.ext.com.google.common.primitives,org.apache.jena.ext.com.google.common.collect,org.apache.jena.ext.com.google.common.escape";version="18.0.0",org.apache.jena.ext.com.google.common.html;uses:="org.apache.jena.ext.com.google.common.escape,javax.annotation";version="18.0.0",org.apache.jena.ext.com.google.common.collect;uses:="org.apache.jena.ext.com.google.common.base,javax.annotation,org.apache.jena.ext.com.google.common.primitives,org.apache.jena.ext.com.google.common.math";version="18.0.0",org.apache.jena.ext.com.google.common.primitives;uses:="org.apache.jena.ext.com.google.common.base,javax.annotation,sun.misc";version="18.0.0",org.apache.jena.ext.com.google.common.base;uses:="javax.annotation";version="18.0.0",org.apache.jena.ext.com.google.common
 .escape;uses:="org.apache.jena.ext.com.google.common.base,javax.annotation";version="18.0.0",org.apache.jena.ext.com.google.common.cache;uses:="org.apache.jena.ext.com.google.common.collect,org.apache.jena.ext.com.google.common.util.concurrent,javax.annotation,org.apache.jena.ext.com.google.common.base,org.apache.jena.ext.com.google.common.primitives,sun.misc";version="18.0.0",org.apache.jena.ext.com.google.common.eventbus;uses:="org.apache.jena.ext.com.google.common.collect,org.apache.jena.ext.com.google.common.cache,javax.annotation,org.apache.jena.ext.com.google.common.base,org.apache.jena.ext.com.google.common.util.concurrent,org.apache.jena.ext.com.google.common.reflect";version="18.0.0",org.apache.jena.ext.com.google.common.util.concurrent;uses:="org.apache.jena.ext.com.google.common.base,javax.annotation,org.apache.jena.ext.com.google.common.collect,org.apache.jena.ext.com.google.common.primitives,org.apache.jena.ext.com.google.common.math";version="18.0.0",org.apache.jena.ex
 t.com.google.common.hash;uses:="org.apache.jena.ext.com.google.common.primitives,org.apache.jena.ext.com.google.common.base,javax.annotation,org.apache.jena.ext.com.google.common.math";version="18.0.0",org.apache.jena.ext.com.google.common.io;uses:="javax.annotation,org.apache.jena.ext.com.google.common.base,org.apache.jena.ext.com.google.common.math,org.apache.jena.ext.com.google.common.hash,org.apache.jena.ext.com.google.common.collect,org.apache.jena.ext.com.google.common.primitives";version="18.0.0",org.apache.jena.ext.com.google.common.xml;uses:="org.apache.jena.ext.com.google.common.escape,javax.annotation";version="18.0.0",org.apache.jena.ext.com.google.common.reflect;uses:="javax.annotation,org.apache.jena.ext.com.google.common.base,org.apache.jena.ext.com.google.common.collect,org.apache.jena.ext.com.google.common.primitives";version="18.0.0",org.apache.jena.ext.com.google.common.math;uses:="org.apache.jena.ext.com.google.common.base,org.apache.jena.ext.com.google.common.pr
 imitives,javax.annotation";version="18.0.0",org.apache.jena.ext.com.google.common.annotations;version="18.0.0"</Export-Package>
+    <Import-Package>javax.annotation;resolution:=optional,sun.misc;resolution:=optional</Import-Package>
+
           </instructions>
         </configuration>
       </plugin>