Skip to content

Commit

Permalink
Shade & relocate dependencies (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
nahguam authored Feb 16, 2023
1 parent 6c29455 commit 7702e49
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
dependency-reduced-pom.xml

### IntelliJ IDEA ###
.idea/*
Expand Down
File renamed without changes.
86 changes: 86 additions & 0 deletions pulsar-metadatastore-oxia/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<shade.relocation.package>io.streamnative.pulsarmetadatastoreoxia.shaded</shade.relocation.package>

<pulsar.version>2.12.0-SNAPSHOT</pulsar.version>
<oxia.java.version>0.0.1-SNAPSHOT</oxia.java.version>
Expand All @@ -52,6 +53,7 @@
<license.plugin.version>4.1</license.plugin.version>
<maven.compiler.plugin.version>3.10.1</maven.compiler.plugin.version>
<maven.enforcer.plugin.version>3.1.0</maven.enforcer.plugin.version>
<maven.shade.plugin.version>3.4.1</maven.shade.plugin.version>
<maven.surefire.plugin.version>3.0.0-M7</maven.surefire.plugin.version>
<spotbugs.plugin.version>4.7.2.0</spotbugs.plugin.version>
<spotless.plugin.version>2.25.0</spotless.plugin.version>
Expand Down Expand Up @@ -305,6 +307,90 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${maven.shade.plugin.version}</version>
<executions>
<execution>
<goals>
<goal>shade</goal>
</goals>
<phase>package</phase>
<configuration>
<createSourcesJar>true</createSourcesJar>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>shaded</shadedClassifierName>
<relocations>
<relocation>
<pattern>com.google</pattern>
<shadedPattern>${shade.relocation.package}.com.google</shadedPattern>
</relocation>
<relocation>
<pattern>com.salesforce</pattern>
<shadedPattern>${shade.relocation.package}.com.salesforce</shadedPattern>
</relocation>
<relocation>
<pattern>google</pattern>
<shadedPattern>${shade.relocation.package}.google</shadedPattern>
</relocation>
<relocation>
<pattern>io.grpc</pattern>
<shadedPattern>${shade.relocation.package}.io.grpc</shadedPattern>
</relocation>
<relocation>
<pattern>io.perfmark</pattern>
<shadedPattern>${shade.relocation.package}.io.perfmark</shadedPattern>
</relocation>
<relocation>
<pattern>io.streamnative.oxia</pattern>
<shadedPattern>${shade.relocation.package}.io.streamnative.oxia</shadedPattern>
</relocation>
<relocation>
<pattern>javax.annotation</pattern>
<shadedPattern>${shade.relocation.package}.javax.annotation</shadedPattern>
</relocation>
<relocation>
<pattern>net.openhft</pattern>
<shadedPattern>${shade.relocation.package}.net.openhft</shadedPattern>
</relocation>
<relocation>
<pattern>org.codehaus</pattern>
<shadedPattern>${shade.relocation.package}.org.codehaus</shadedPattern>
</relocation>
<relocation>
<pattern>okio</pattern>
<shadedPattern>${shade.relocation.package}.okio</shadedPattern>
</relocation>
<relocation>
<pattern>org.checkerframework</pattern>
<shadedPattern>${shade.relocation.package}.org.checkerframework</shadedPattern>
</relocation>
<relocation>
<pattern>org.reactivestreams</pattern>
<shadedPattern>${shade.relocation.package}.org.reactivestreams</shadedPattern>
</relocation>
<relocation>
<pattern>reactor</pattern>
<shadedPattern>${shade.relocation.package}.reactor</shadedPattern>
</relocation>
</relocations>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>module-info.class</exclude>
<exclude>META-INF/MANIFEST.MF</exclude>
</excludes>
</filter>
</filters>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
Expand Down

0 comments on commit 7702e49

Please sign in to comment.