Skip to content

Commit

Permalink
Fixed shading of pulsar-client and pulsar-client-admin (apache#1974)
Browse files Browse the repository at this point in the history
  • Loading branch information
merlimat authored Jun 16, 2018
1 parent 4e99ffe commit fee34d0
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 6 deletions.
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
39 changes: 38 additions & 1 deletion pulsar-client-admin-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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" />
Expand Down
24 changes: 22 additions & 2 deletions pulsar-client-kafka-compat/pulsar-client-kafka-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,19 @@
<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>
<include>com.yahoo.datasketches:sketches-core</include>
<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>
Expand Down Expand Up @@ -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>
Expand Down
23 changes: 21 additions & 2 deletions pulsar-client-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,18 @@
<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>
<include>com.yahoo.datasketches:sketches-core</include>
<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>
Expand Down Expand Up @@ -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" />
Expand Down
2 changes: 1 addition & 1 deletion pulsar-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@

<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<artifactId>jetty-util</artifactId>
</dependency>

<dependency>
Expand Down
6 changes: 6 additions & 0 deletions pulsar-functions/proto/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit fee34d0

Please sign in to comment.