Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

build: add maven-shade for zkclient&guava #72

Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ rolling_log/
.vscode/
google-java-format-*
pegasus-*
dependency-reduced-pom.xml
31 changes: 31 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
</plugins>
</reporting>
<properties>
<pegasus.shade.name>com.xiaomi.infra.pegasus.thirdparty</pegasus.shade.name>
</properties>
<build>
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
Expand All @@ -94,6 +95,36 @@
<outputDirectory>${project.basedir}/target/classes</outputDirectory>
<testOutputDirectory>${project.basedir}/target/test-classes</testOutputDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<includes>
<include>com.101tec</include>
<include>com.google.guava</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>com.google</pattern>
<shadedPattern>${pegasus.shade.name}.com.google</shadedPattern>
</relocation>
<relocation>
<pattern>org.I0Itec</pattern>
<shadedPattern>${pegasus.shade.name}.org.I0Itec</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down