Skip to content
Permalink
Browse files
Add support for Jakarta relocation
  • Loading branch information
jeanouii committed Feb 23, 2022
1 parent 0f2b1a5 commit 3ec4c8b348661caf79b8312d8697e3e7d78b1ef7
Showing 1 changed file with 62 additions and 0 deletions.
62 pom.xml
@@ -141,6 +141,68 @@
</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.interceptor</pattern>
<shadedPattern>jakarta.interceptor</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 3ec4c8b

Please sign in to comment.