You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltaspike.apache.org by st...@apache.org on 2021/08/27 21:00:07 UTC

[deltaspike] branch master updated: DELTASPIKE-1434 add shading for jakarta EE package names

This is an automated email from the ASF dual-hosted git repository.

struberg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/deltaspike.git


The following commit(s) were added to refs/heads/master by this push:
     new 003b359  DELTASPIKE-1434 add shading for jakarta EE package names
003b359 is described below

commit 003b3593ee3ad4cf8aa8d3538fe92f71fb12670c
Author: Mark Struberg <st...@apache.org>
AuthorDate: Fri Aug 27 22:58:27 2021 +0200

    DELTASPIKE-1434 add shading for jakarta EE package names
    
    This commit adds shading from javax to jakarta namespace
    as aditional attachted artifacts with qualifier 'jakarta'.
---
 deltaspike/modules/proxy/impl-asm/pom.xml | 60 +++++++++++++++++++++----------
 deltaspike/parent/code/pom.xml            | 26 ++++++++++++++
 2 files changed, 68 insertions(+), 18 deletions(-)

diff --git a/deltaspike/modules/proxy/impl-asm/pom.xml b/deltaspike/modules/proxy/impl-asm/pom.xml
index 7e2c39c..8dffa84 100644
--- a/deltaspike/modules/proxy/impl-asm/pom.xml
+++ b/deltaspike/modules/proxy/impl-asm/pom.xml
@@ -47,31 +47,55 @@
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-shade-plugin</artifactId>
                 <version>3.2.1</version>
-                <configuration>
-                    <shadedArtifactAttached>false</shadedArtifactAttached>
-                    <createDependencyReducedPom>false</createDependencyReducedPom>
-                    <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
-                    <relocations>
-                        <relocation>
-                            <pattern>org.objectweb.asm</pattern>
-                            <shadedPattern>org.apache.deltaspike.proxy.asm</shadedPattern>
-                        </relocation>
-                    </relocations>
-                    <artifactSet>
-                        <includes>
-                            <include>org.ow2.asm:asm</include>
-                            <include>org.ow2.asm:asm-commons</include>
-                            <include>org.ow2.asm:asm-tree</include>
-                        </includes>
-                    </artifactSet>
-                </configuration>
                 <executions>
                     <execution>
+                        <id>shade-asm</id>
                         <phase>package</phase>
                         <goals>
                             <goal>shade</goal>
                         </goals>
+                        <configuration>
+                            <shadedArtifactAttached>false</shadedArtifactAttached>
+                            <createDependencyReducedPom>false</createDependencyReducedPom>
+                            <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
+                            <relocations>
+                                <relocation>
+                                    <pattern>org.objectweb.asm</pattern>
+                                    <shadedPattern>org.apache.deltaspike.proxy.asm</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <artifactSet>
+                                <includes>
+                                    <include>org.ow2.asm:asm</include>
+                                    <include>org.ow2.asm:asm-commons</include>
+                                    <include>org.ow2.asm:asm-tree</include>
+                                </includes>
+                            </artifactSet>
+                        </configuration>
                     </execution>
+                    <execution>
+                        <!--
+                         This execution is actually a 1:1 copy from the parent-code module.
+                         But we move this over here because it must be executed AFTER the ASM shading!
+                        -->
+                        <id>shade-jakarta</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <shadedArtifactAttached>true</shadedArtifactAttached>
+                            <shadedClassifierName>jakarta</shadedClassifierName>
+                            <createDependencyReducedPom>false</createDependencyReducedPom>
+                            <relocations>
+                                <relocation>
+                                    <pattern>javax</pattern>
+                                    <shadedPattern>jakarta</shadedPattern>
+                                </relocation>
+                            </relocations>
+                        </configuration>
+                    </execution>
+
                 </executions>
                 <dependencies>
                     <dependency>
diff --git a/deltaspike/parent/code/pom.xml b/deltaspike/parent/code/pom.xml
index 839e1fe..da3c9fb 100644
--- a/deltaspike/parent/code/pom.xml
+++ b/deltaspike/parent/code/pom.xml
@@ -148,6 +148,32 @@
                     </execution>
                 </executions>
             </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <version>3.2.1</version>
+                <executions>
+                    <execution>
+                        <id>shade-jakarta</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <shadedArtifactAttached>true</shadedArtifactAttached>
+                            <shadedClassifierName>jakarta</shadedClassifierName>
+                            <createDependencyReducedPom>false</createDependencyReducedPom>
+                            <relocations>
+                                <relocation>
+                                    <pattern>javax</pattern>
+                                    <shadedPattern>jakarta</shadedPattern>
+                                </relocation>
+                            </relocations>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>