merlimat closed pull request #1974: Fixed shading of pulsar-client and 
pulsar-client-admin
URL: https://github.com/apache/incubator-pulsar/pull/1974
 
 
   

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 90af15d81c..cbfffd32d8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -348,6 +348,12 @@ flexible messaging model and an intuitive client 
API.</description>
         <version>${jetty.version}</version>
       </dependency>
 
+      <dependency>
+        <groupId>org.eclipse.jetty</groupId>
+        <artifactId>jetty-util</artifactId>
+        <version>${jetty.version}</version>
+      </dependency>
+
       <dependency>
         <groupId>io.netty</groupId>
         <artifactId>netty-all</artifactId>
diff --git a/pulsar-client-admin-shaded/pom.xml 
b/pulsar-client-admin-shaded/pom.xml
index 839091f7eb..4f06fbb448 100644
--- a/pulsar-client-admin-shaded/pom.xml
+++ b/pulsar-client-admin-shaded/pom.xml
@@ -57,6 +57,7 @@
 
               <artifactSet>
                 <includes>
+                  <include>org.apache.pulsar:pulsar-functions-proto</include>
                   <include>org.apache.pulsar:pulsar-io-core</include>
                   <include>org.apache.pulsar:pulsar-client-original</include>
                   
<include>org.apache.pulsar:pulsar-client-admin-original</include>
@@ -84,7 +85,19 @@
                   <include>javax.annotation:*</include>
                   <include>org.glassfish.hk2*:*</include>
                   <include>com.fasterxml.jackson.*:*</include>
-                  <include>org.apache.avro:avro</include>
+                  <include>io.grpc:*</include>
+                  <include>com.yahoo.datasketches:*</include>
+                  <include>io.netty:*</include>
+                  <include>com.squareup.*:*</include>
+                  <include>com.google.*:*</include>
+                  <include>commons-*:*</include>
+                  <include>org.apache.httpcomponents:*</include>
+                  <include>org.eclipse.jetty:*</include>
+                  <include>com.google.auth:*</include>
+                  <include>org.jvnet.mimepull:*</include>
+                  <include>io.opencensus:*</include>
+
+                  <include>org.apache.avro:*</include>
                   <!-- Avro transitive dependencies-->
                   <include>org.codehaus.jackson:jackson-core-asl</include>
                   <include>org.codehaus.jackson:jackson-mapper-asl</include>
@@ -216,6 +229,30 @@
                       <pattern>org.tukaani</pattern>
                       
<shadedPattern>org.apache.pulsar.shade.org.tukaani</shadedPattern>
                   </relocation>
+                  <relocation>
+                      <pattern>io.grpc</pattern>
+                      
<shadedPattern>org.apache.pulsar.shade.io.grpc</shadedPattern>
+                  </relocation>
+                  <relocation>
+                      <pattern>okio</pattern>
+                      
<shadedPattern>org.apache.pulsar.shade.okio</shadedPattern>
+                  </relocation>
+                  <relocation>
+                      <pattern>com.squareup</pattern>
+                      
<shadedPattern>org.apache.pulsar.shade.com.squareup</shadedPattern>
+                  </relocation>
+                  <relocation>
+                      <pattern>io.opencensus</pattern>
+                      
<shadedPattern>org.apache.pulsar.shade.io.opencensus</shadedPattern>
+                  </relocation>
+                  <relocation>
+                      <pattern>org.eclipse.jetty</pattern>
+                      
<shadedPattern>org.apache.pulsar.shade.org.eclipse.jetty</shadedPattern>
+                  </relocation>
+                  <relocation>
+                      <pattern>org.apache.http</pattern>
+                      
<shadedPattern>org.apache.pulsar.shade.org.apache.http</shadedPattern>
+                  </relocation>
               </relocations>
               <transformers>
                 <transformer 
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"
 />
diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka-shaded/pom.xml 
b/pulsar-client-kafka-compat/pulsar-client-kafka-shaded/pom.xml
index 0bd9453da3..c8ec154204 100644
--- a/pulsar-client-kafka-compat/pulsar-client-kafka-shaded/pom.xml
+++ b/pulsar-client-kafka-compat/pulsar-client-kafka-shaded/pom.xml
@@ -83,7 +83,7 @@
                   <include>com.fasterxml.jackson.core</include>
                   <include>com.fasterxml.jackson.module</include>
                   <include>io.netty:netty</include>
-                  <include>io.netty:netty-all</include>
+                  <include>io.netty:netty-*</include>
                   <include>org.apache.pulsar:pulsar-common</include>
                   <include>org.apache.bookkeeper:circe-checksum</include>
                   <include>net.jpountz.lz4:lz4</include>
@@ -91,7 +91,11 @@
                   <include>org.apache.httpcomponents:httpclient</include>
                   <include>commons-logging:commons-logging</include>
                   <include>org.apache.httpcomponents:httpcore</include>
-                  <include>org.apache.avro:avro</include>
+                  <include>org.eclipse.jetty:*</include>
+                  <include>com.yahoo.datasketches:*</include>
+                  <include>commons-*:*</include>
+                  
+                  <include>org.apache.avro:*</include>
                   <!-- Avro transitive dependencies-->
                   <include>org.codehaus.jackson:jackson-core-asl</include>
                   <include>org.codehaus.jackson:jackson-mapper-asl</include>
@@ -202,6 +206,22 @@
                   <pattern>org.tukaani</pattern>
                   
<shadedPattern>org.apache.pulsar.shade.org.tukaani</shadedPattern>
                 </relocation>
+                <relocation>
+                   <pattern>org.eclipse.jetty</pattern>
+                   
<shadedPattern>org.apache.pulsar.shade.org.eclipse</shadedPattern>
+                </relocation>
+                <relocation>
+                   <pattern>org.reactivestreams</pattern>
+                   
<shadedPattern>org.apache.pulsar.shade.org.reactivestreams</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>com.typesafe</pattern>
+                  
<shadedPattern>org.apache.pulsar.shade.com.typesafe</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>com.yahoo.memory</pattern>
+                  
<shadedPattern>org.apache.pulsar.shade.com.yahoo.memory</shadedPattern>
+                </relocation>
               </relocations>
               <filters>
                 <filter>
diff --git a/pulsar-client-shaded/pom.xml b/pulsar-client-shaded/pom.xml
index 3df4105b6a..f88f90c33a 100644
--- a/pulsar-client-shaded/pom.xml
+++ b/pulsar-client-shaded/pom.xml
@@ -78,7 +78,10 @@
                   <include>io.netty:netty</include>
                   <include>io.netty:netty-all</include>
                   <include>io.netty:netty-tcnative-boringssl-static</include>
-                  
+                  <include>org.eclipse.jetty:*</include>
+                  <include>com.yahoo.datasketches:*</include>
+                  <include>commons-*:*</include>
+
                   <include>org.apache.pulsar:pulsar-common</include>
                   <include>org.apache.bookkeeper:circe-checksum</include>
                   <include>net.jpountz.lz4:lz4</include>
@@ -86,7 +89,7 @@
                   <include>org.apache.httpcomponents:httpclient</include>
                   <include>commons-logging:commons-logging</include>
                   <include>org.apache.httpcomponents:httpcore</include>
-                  <include>org.apache.avro:avro</include>
+                  <include>org.apache.avro:*</include>
                   <!-- Avro transitive dependencies-->
                   <include>org.codehaus.jackson:jackson-core-asl</include>
                   <include>org.codehaus.jackson:jackson-mapper-asl</include>
@@ -196,6 +199,22 @@
                   <pattern>org.tukaani</pattern>
                   
<shadedPattern>org.apache.pulsar.shade.org.tukaani</shadedPattern>
                 </relocation>
+                <relocation>
+                  <pattern>org.eclipse.jetty</pattern>
+                  
<shadedPattern>org.apache.pulsar.shade.org.eclipse</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>org.reactivestreams</pattern>
+                  
<shadedPattern>org.apache.pulsar.shade.org.reactivestreams</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>com.typesafe</pattern>
+                  
<shadedPattern>org.apache.pulsar.shade.com.typesafe</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>com.yahoo.memory</pattern>
+                  
<shadedPattern>org.apache.pulsar.shade.com.yahoo.memory</shadedPattern>
+                </relocation>
               </relocations>
               <transformers>
                 <transformer 
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"
 />
diff --git a/pulsar-common/pom.xml b/pulsar-common/pom.xml
index a7e0d57d31..d8bece87c9 100644
--- a/pulsar-common/pom.xml
+++ b/pulsar-common/pom.xml
@@ -95,7 +95,7 @@
 
        <dependency>
                <groupId>org.eclipse.jetty</groupId>
-               <artifactId>jetty-server</artifactId>
+               <artifactId>jetty-util</artifactId>
        </dependency>
 
     <dependency>
diff --git a/pulsar-functions/proto/pom.xml b/pulsar-functions/proto/pom.xml
index aedb44776c..57d50a6088 100644
--- a/pulsar-functions/proto/pom.xml
+++ b/pulsar-functions/proto/pom.xml
@@ -44,6 +44,12 @@
         <dependency>
             <groupId>io.grpc</groupId>
             <artifactId>grpc-all</artifactId>
+            <exclusions>
+              <exclusion>
+                <groupId>io.netty</groupId>
+                <artifactId>*</artifactId>
+              </exclusion>
+            </exclusions>
         </dependency>
 
     </dependencies>


 

----------------------------------------------------------------
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