Skip to content

Commit

Permalink
Publish pulsar-client-admin as a shaded artifact (apache#1095)
Browse files Browse the repository at this point in the history
  • Loading branch information
merlimat authored Jan 30, 2018
1 parent 8c93ff8 commit 650a6b8
Show file tree
Hide file tree
Showing 7 changed files with 201 additions and 64 deletions.
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ flexible messaging model and an intuitive client API.</description>
<module>pulsar-broker</module>
<module>pulsar-broker-shaded</module>
<module>pulsar-client-admin</module>
<module>pulsar-client-admin-shaded</module>
<module>pulsar-client-tools</module>
<module>pulsar-client</module>
<module>pulsar-client-shaded</module>
Expand Down
2 changes: 1 addition & 1 deletion pulsar-broker-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<include>org.apache.pulsar:pulsar-common</include>
<include>org.apache.pulsar:pulsar-client</include>
<include>org.apache.pulsar:pulsar-client-original</include>
<include>org.apache.pulsar:pulsar-client-admin</include>
<include>org.apache.pulsar:pulsar-client-admin-original</include>
<include>com.google.guava:guava</include>
<include>org.apache.pulsar:pulsar-broker-common</include>
<include>org.apache.bookkeeper:bookkeeper-server</include>
Expand Down
2 changes: 1 addition & 1 deletion pulsar-broker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>pulsar-client-admin</artifactId>
<artifactId>pulsar-client-admin-original</artifactId>
<version>${project.version}</version>
</dependency>

Expand Down
194 changes: 194 additions & 0 deletions pulsar-client-admin-shaded/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.pulsar</groupId>
<artifactId>pulsar</artifactId>
<version>1.22.0-incubating-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

<artifactId>pulsar-client-admin</artifactId>
<name>Pulsar Client Admin</name>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>pulsar-client-admin-original</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>true</createDependencyReducedPom>
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>

<artifactSet>
<includes>
<include>org.apache.pulsar:pulsar-client-original</include>
<include>org.apache.pulsar:pulsar-client-admin-original</include>
<include>org.apache.commons:commons-lang3</include>
<include>commons-codec:commons-codec</include>
<include>commons-collections:commons-collections</include>
<include>org.asynchttpclient:*</include>
<include>io.netty:netty-codec-http</include>
<include>io.netty:netty-transport-native-epoll</include>
<include>org.reactivestreams:reactive-streams</include>
<include>com.typesafe.netty:netty-reactive-streams</include>
<include>org.javassist:javassist</include>
<include>com.google.protobuf:protobuf-java</include>
<include>com.google.guava:guava</include>
<include>com.google.code.gson:gson</include>
<include>com.fasterxml.jackson.core</include>
<include>io.netty:netty</include>
<include>io.netty:netty-all</include>
<include>org.apache.pulsar:pulsar-common</include>
<include>org.apache.pulsar:pulsar-checksum</include>
<include>net.jpountz.lz4:lz4</include>
<include>com.yahoo.datasketches:sketches-core</include>
<include>org.glassfish.jersey*:*</include>
<include>javax.ws.rs:*</include>
<include>javax.annotation:*</include>
<include>org.glassfish.hk2*:*</include>
<include>com.fasterxml.jackson.*:*</include>
</includes>
</artifactSet>
<filters>
<filter>
<artifact>net.jpountz.lz4:lz4</artifact>
<includes>
<include>**</include>
</includes>
</filter>
<filter>
<artifact>org.apache.pulsar:pulsar-client-original</artifact>
<includes>
<include>**</include>
</includes>
</filter>
</filters>
<relocations>
<relocation>
<pattern>org.asynchttpclient</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.org.asynchttpclient</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.commons</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.org.apache.commons</shadedPattern>
</relocation>
<relocation>
<pattern>com.google</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.com.google</shadedPattern>
</relocation>
<relocation>
<pattern>com.fasterxml.jackson</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.com.fasterxml.jackson</shadedPattern>
</relocation>
<relocation>
<pattern>io.netty</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.io.netty</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.pulsar.common</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.org.apache.pulsar.common</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.pulsar.policies</pattern>
<shadedPattern>org.apache.pulsar.admin.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>
</relocation>
<relocation>
<pattern>com.scurrilous.circe</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.com.scurrilous.circe</shadedPattern>
</relocation>
<relocation>
<pattern>net.jpountz</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.net.jpountz</shadedPattern>
</relocation>
<relocation>
<pattern>com.yahoo</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.com.yahoo</shadedPattern>
</relocation>
<relocation>
<pattern>com.typesafe</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.com.typesafe</shadedPattern>
</relocation>
<relocation>
<pattern>org.glassfish</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.org.glassfish</shadedPattern>
</relocation>
<relocation>
<pattern>javax.ws</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.javax.ws</shadedPattern>
</relocation>
<relocation>
<pattern>javax.annotation</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.javax.annotation</shadedPattern>
</relocation>
<relocation>
<pattern>jersey</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.jersey</shadedPattern>
</relocation>
<relocation>
<pattern>org.jvnet</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.org.jvnet</shadedPattern>
</relocation>
<relocation>
<pattern>org.aopalliance</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.org.aopalliance</shadedPattern>
</relocation>
<relocation>
<pattern>javassist</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.javassist</shadedPattern>
</relocation>
<relocation>
<pattern>javax.inject</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.javax.inject</shadedPattern>
</relocation>
<relocation>
<pattern>org.reactivestreams</pattern>
<shadedPattern>org.apache.pulsar.admin.shade.org.reactivestreams</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
62 changes: 2 additions & 60 deletions pulsar-client-admin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
<relativePath>..</relativePath>
</parent>

<artifactId>pulsar-client-admin</artifactId>
<name>Pulsar Client Admin</name>
<artifactId>pulsar-client-admin-original</artifactId>
<name>Pulsar Client Admin Original</name>

<dependencies>
<dependency>
Expand Down Expand Up @@ -76,62 +76,4 @@
<artifactId>gson</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>true</createDependencyReducedPom>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>shaded</shadedClassifierName>
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>

<artifactSet>
<includes>
<include>org.apache.commons:commons-lang3</include>
<include>commons-codec:commons-codec</include>
<include>commons-collections:commons-collections</include>
<include>org.asynchttpclient:async-http-client</include>
<include>com.google.protobuf:protobuf-java</include>
<include>com.google.guava:guava</include>
<include>com.google.code.gson:gson</include>
<include>io.netty:netty</include>
<include>io.netty:netty-all</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>org.apache.commons</pattern>
<shadedPattern>pulsar-admin-shade.org.apache.commons</shadedPattern>
</relocation>
<relocation>
<pattern>org.asynchttpclient</pattern>
<shadedPattern>org.apache.pulsar.shade.org.asynchttpclient</shadedPattern>
</relocation>
<relocation>
<pattern>com.google</pattern>
<shadedPattern>pulsar-admin-shade.com.google</shadedPattern>
</relocation>
<relocation>
<pattern>org.jboss.netty</pattern>
<shadedPattern>pulsar-admin-shade.org.jboss.netty</shadedPattern>
</relocation>
<relocation>
<pattern>io.netty</pattern>
<shadedPattern>pulsar-admin-shade.io.netty</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
2 changes: 1 addition & 1 deletion pulsar-client-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>pulsar-client-admin</artifactId>
<artifactId>pulsar-client-admin-original</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
Expand Down
2 changes: 1 addition & 1 deletion pulsar-testclient/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>pulsar-client-admin</artifactId>
<artifactId>pulsar-client-admin-original</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down

0 comments on commit 650a6b8

Please sign in to comment.