Skip to content
Permalink
Browse files
Add support for Jakarta relocation
  • Loading branch information
jeanouii committed Feb 23, 2022
1 parent d97e68a commit d2c00493077c0f03614abf8f14af42368985c20f
Showing 1 changed file with 59 additions and 0 deletions.
59 pom.xml
@@ -316,6 +316,65 @@
<target>1.8</target>
</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.servlet</pattern>
<shadedPattern>jakarta.servlet</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 d2c0049

Please sign in to comment.