merlimat closed pull request #1849: Shade jars included in java instance uber 
jar
URL: https://github.com/apache/incubator-pulsar/pull/1849
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/pom.xml b/pom.xml
index a63515a740..d50d1844c1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -716,6 +716,12 @@ flexible messaging model and an intuitive client 
API.</description>
         <groupId>io.grpc</groupId>
         <artifactId>grpc-all</artifactId>
         <version>${grpc.version}</version>
+        <exclusions>
+          <exclusion>
+            <groupId>io.grpc</groupId>
+            <artifactId>grpc-testing</artifactId>
+          </exclusion>
+        </exclusions>
       </dependency>
 
       <dependency>
diff --git a/pulsar-functions/runtime-all/pom.xml 
b/pulsar-functions/runtime-all/pom.xml
index 9219c4b09f..4e8d3546a1 100644
--- a/pulsar-functions/runtime-all/pom.xml
+++ b/pulsar-functions/runtime-all/pom.xml
@@ -74,11 +74,10 @@
             </goals>
             <configuration>
               <finalName>java-instance</finalName>
+              <minimizeJar>false</minimizeJar>
               <transformers>
-                <transformer
-                        
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
-                  <mainClass>org.openjdk.jmh.Main</mainClass>
-                </transformer>
+                <transformer 
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"
 />
+                <transformer 
implementation="org.apache.maven.plugins.shade.resource.PluginXmlResourceTransformer"
 />
               </transformers>
               <artifactSet>
                 <excludes>
@@ -106,6 +105,112 @@
                   </excludes>
                 </filter>
               </filters>
+              <relocations>
+                <relocation>
+                  <pattern>com.google</pattern>
+                  
<shadedPattern>org.apache.pulsar.functions.runtime.shaded.com.google</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>io.netty</pattern>
+                  
<shadedPattern>org.apache.pulsar.functions.runtime.shaded.io.netty</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>io.grpc</pattern>
+                  
<shadedPattern>org.apache.pulsar.functions.runtime.shaded.io.grpc</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>org.apache.bookkeeper</pattern>
+                  
<shadedPattern>org.apache.pulsar.functions.runtime.shaded.org.apache.bookkeeper</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>com.squareup</pattern>
+                  
<shadedPattern>org.apache.pulsar.functions.runtime.shaded.com.squareup</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>okio</pattern>
+                  
<shadedPattern>org.apache.pulsar.functions.runtime.shaded.okio</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>org.inferred</pattern>
+                  
<shadedPattern>org.apache.pulsar.functions.runtime.shaded.org.inferred</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>org.jboss</pattern>
+                  
<shadedPattern>org.apache.pulsar.functions.runtime.shaded.org.jboss</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>com.fasterxml.jackson</pattern>
+                  
<shadedPattern>org.apache.pulsar.functions.runtime.shaded.com.fasterxml.jackson</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>com.beust</pattern>
+                  
<shadedPattern>org.apache.pulsar.functions.runtime.shaded.com.beust</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>net.jodah</pattern>
+                  
<shadedPattern>org.apache.pulsar.functions.runtime.shaded.net.jodah</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>org.yaml</pattern>
+                  
<shadedPattern>org.apache.pulsar.functions.runtime.shaded.org.yaml</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>org.glassfish</pattern>
+                  
<shadedPattern>org.apache.pulsar.functions.runtime.shaded.org.glassfish</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>com.scurrilous.circe</pattern>
+                  
<shadedPattern>org.apache.pulsar.functions.runtime.shaded.com.scurrilous.circe</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>net.jpountz</pattern>
+                  
<shadedPattern>org.apache.pulsar.functions.runtime.shaded.net.jpountz</shadedPattern>
+                </relocation>
+                  <relocation>
+                  <pattern>com.yahoo</pattern>
+                  
<shadedPattern>org.apache.pulsar.functions.runtime.shaded.com.yahoo</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>org.apache.http</pattern>
+                  
<shadedPattern>org.apache.pulsar.functions.runtime.shaded.org.apache.http</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>org.apache.commons</pattern>
+                  
<shadedPattern>org.apache.pulsar.functions.runtime.shaded.org.apache.commons</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>org.jvnet</pattern>
+                  
<shadedPattern>org.apache.pulsar.functions.runtime.shaded.org.jvnet</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>io.opencensus</pattern>
+                  
<shadedPattern>org.apache.pulsar.functions.runtime.shaded.io.opencensus</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>org.eclipse</pattern>
+                  
<shadedPattern>org.apache.pulsar.functions.runtime.shaded.org.eclipse</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>org.asynchttpclient</pattern>
+                  
<shadedPattern>org.apache.pulsar.functions.runtime.shaded.org.asynchttpclient</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>org.bouncycastle</pattern>
+                  
<shadedPattern>org.apache.pulsar.functions.runtime.shaded.org.bouncycastle</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>jersey</pattern>
+                  
<shadedPattern>org.apache.pulsar.functions.runtime.shaded.jersey</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>org.apache.logging</pattern>
+                  
<shadedPattern>org.apache.pulsar.functions.runtime.shaded.org.apache.logging</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>javassist</pattern>
+                  
<shadedPattern>org.apache.pulsar.functions.runtime.shaded.javassist</shadedPattern>
+                </relocation>
+              </relocations>
             </configuration>
           </execution>
         </executions>


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to