Skip to content

Commit

Permalink
Improve pulsar-client shading (apache#2006)
Browse files Browse the repository at this point in the history
* Improve pulsar-client shading

*Motivation*

- we should not shade `org.apache.pulsar.common` classes, since they will be used by pulsar api
- Change the shading rules for pulsar-client-admin to make sure they have same shading rules as client, so they can be used together.

*Changes*

- Exclude `org.apache.pulsar.common` from pulsar-client shading rule
- Change shade class prefix for `pulsar-client-admin`

* Use pulsar-client-original in s3-offload integration
  • Loading branch information
sijie authored and srkukarni committed Jun 21, 2018
1 parent 8cc296e commit edaaafc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 25 deletions.
40 changes: 20 additions & 20 deletions pulsar-client-admin-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,83 +130,83 @@
<relocations>
<relocation>
<pattern>org.asynchttpclient</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.org.asynchttpclient</shadedPattern>
<shadedPattern>org.apache.pulsar.shade.org.asynchttpclient</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.commons</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.org.apache.commons</shadedPattern>
<shadedPattern>org.apache.pulsar.shade.org.apache.commons</shadedPattern>
</relocation>
<relocation>
<pattern>com.google</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.com.google</shadedPattern>
<shadedPattern>org.apache.pulsar.shade.com.google</shadedPattern>
</relocation>
<relocation>
<pattern>com.fasterxml.jackson</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.com.fasterxml.jackson</shadedPattern>
<shadedPattern>org.apache.pulsar.shade.com.fasterxml.jackson</shadedPattern>
</relocation>
<relocation>
<pattern>io.netty</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.io.netty</shadedPattern>
<shadedPattern>org.apache.pulsar.shade.io.netty</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.pulsar.policies</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.org.apache.pulsar.policies</shadedPattern>
<shadedPattern>org.apache.pulsar.shade.org.apache.pulsar.policies</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.pulsar.checksum</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.org.apache.pulsar.checksum</shadedPattern>
<shadedPattern>org.apache.pulsar.shade.org.apache.pulsar.checksum</shadedPattern>
</relocation>
<relocation>
<pattern>com.scurrilous.circe</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.com.scurrilous.circe</shadedPattern>
<shadedPattern>org.apache.pulsar.shade.com.scurrilous.circe</shadedPattern>
</relocation>
<relocation>
<pattern>net.jpountz</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.net.jpountz</shadedPattern>
<shadedPattern>org.apache.pulsar.shade.net.jpountz</shadedPattern>
</relocation>
<relocation>
<pattern>com.yahoo</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.com.yahoo</shadedPattern>
<shadedPattern>org.apache.pulsar.shade.com.yahoo</shadedPattern>
</relocation>
<relocation>
<pattern>com.typesafe</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.com.typesafe</shadedPattern>
<shadedPattern>org.apache.pulsar.shade.com.typesafe</shadedPattern>
</relocation>
<relocation>
<pattern>org.glassfish</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.org.glassfish</shadedPattern>
<shadedPattern>org.apache.pulsar.shade.org.glassfish</shadedPattern>
</relocation>
<relocation>
<pattern>javax.ws</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.javax.ws</shadedPattern>
<shadedPattern>org.apache.pulsar.shade.javax.ws</shadedPattern>
</relocation>
<relocation>
<pattern>javax.annotation</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.javax.annotation</shadedPattern>
<shadedPattern>org.apache.pulsar.shade.javax.annotation</shadedPattern>
</relocation>
<relocation>
<pattern>jersey</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.jersey</shadedPattern>
<shadedPattern>org.apache.pulsar.shade.jersey</shadedPattern>
</relocation>
<relocation>
<pattern>org.jvnet</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.org.jvnet</shadedPattern>
<shadedPattern>org.apache.pulsar.shade.org.jvnet</shadedPattern>
</relocation>
<relocation>
<pattern>org.aopalliance</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.org.aopalliance</shadedPattern>
<shadedPattern>org.apache.pulsar.shade.org.aopalliance</shadedPattern>
</relocation>
<relocation>
<pattern>javassist</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.javassist</shadedPattern>
<shadedPattern>org.apache.pulsar.shade.javassist</shadedPattern>
</relocation>
<relocation>
<pattern>javax.inject</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.javax.inject</shadedPattern>
<shadedPattern>org.apache.pulsar.shade.javax.inject</shadedPattern>
</relocation>
<relocation>
<pattern>org.reactivestreams</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.org.reactivestreams</shadedPattern>
<shadedPattern>org.apache.pulsar.shade.org.reactivestreams</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.avro</pattern>
Expand Down
4 changes: 0 additions & 4 deletions pulsar-client-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,6 @@
<pattern>io.netty</pattern>
<shadedPattern>org.apache.pulsar.shade.io.netty</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.pulsar.common</pattern>
<shadedPattern>org.apache.pulsar.shade.org.apache.pulsar.common</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.pulsar.policies</pattern>
<shadedPattern>org.apache.pulsar.shade.org.apache.pulsar.policies</shadedPattern>
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/s3-offload/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<dependencies>
<dependency>
<groupId>org.apache.pulsar</groupId>
<artifactId>pulsar-client</artifactId>
<artifactId>pulsar-client-original</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down

0 comments on commit edaaafc

Please sign in to comment.