Skip to content
Permalink
Browse files
Add support for Jakarta relocation
  • Loading branch information
jeanouii committed Feb 23, 2022
1 parent c656f8c commit cbfb3e3ecee612b88bd029608fc3dded3b06bc2a
Showing 1 changed file with 54 additions and 0 deletions.
54 pom.xml
@@ -105,6 +105,60 @@
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>jakarta</shadedClassifierName>
<createDependencyReducedPom>false</createDependencyReducedPom>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
</transformers>
<artifactSet> <!-- don't include transitive deps -->
<includes>
<include>${project.groupId}:${project.artifactId}</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>javax.annotation</pattern>
<shadedPattern>jakarta.annotation</shadedPattern>
<excludes>
<exclude>javax.annotation.processing.**</exclude>
</excludes>
</relocation>
<relocation>
<pattern>javax.enterprise</pattern>
<shadedPattern>jakarta.enterprise</shadedPattern>
<excludes>
<exclude>javax.enterprise.deploy.**</exclude>
</excludes>
</relocation>
<relocation>
<pattern>javax.inject</pattern>
<shadedPattern>jakarta.inject</shadedPattern>
</relocation>
<relocation>
<pattern>javax.json</pattern>
<shadedPattern>jakarta.json</shadedPattern>
</relocation>
<relocation>
<pattern>javax.ws.rs</pattern>
<shadedPattern>jakarta.ws.rs</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

0 comments on commit cbfb3e3

Please sign in to comment.