You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2020/12/20 19:37:57 UTC

[maven] 01/01: [MNG-7045] Drop CDI API from Maven

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

michaelo pushed a commit to branch MNG-7045
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 6ec7586544679db3d7a8dff996e747d8e21de37d
Author: Romain Manni-Bucau <rm...@gmail.com>
AuthorDate: Thu Dec 3 20:07:03 2020 +0100

    [MNG-7045] Drop CDI API from Maven
    
    This closes #408
---
 maven-core/src/main/resources/META-INF/maven/extension.xml | 4 +++-
 pom.xml                                                    | 6 ++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/maven-core/src/main/resources/META-INF/maven/extension.xml b/maven-core/src/main/resources/META-INF/maven/extension.xml
index 0eceb2b..9007dc7 100644
--- a/maven-core/src/main/resources/META-INF/maven/extension.xml
+++ b/maven-core/src/main/resources/META-INF/maven/extension.xml
@@ -96,9 +96,11 @@ under the License.
 
     <!-- javax.inject (JSR-330) -->
     <exportedPackage>javax.inject.*</exportedPackage>
-    <!-- javax.enterprise.inject (JSR-299) -->
+    <!-- javax.enterprise.inject (JSR-299): Must never be exported if needed at plugin level, plugin adds it
+         there is no justification to get it at Maven level and leaking it will conflict.
     <exportedPackage>javax.enterprise.util.*</exportedPackage>
     <exportedPackage>javax.enterprise.inject.*</exportedPackage>
+    -->
 
     <!-- javax.annotation (JSR-250) -->
     <exportedPackage>javax.annotation.*</exportedPackage>
diff --git a/pom.xml b/pom.xml
index d8e39bf..23f976f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -273,6 +273,12 @@ under the License.
         <groupId>org.eclipse.sisu</groupId>
         <artifactId>org.eclipse.sisu.plexus</artifactId>
         <version>${sisuInjectVersion}</version>
+        <exclusions>
+          <exclusion> <!-- Way too easy to conflict with plugins to be in Maven and leak in plugins -->
+            <groupId>javax.enterprise</groupId>
+            <artifactId>cdi-api</artifactId>
+          </exclusion>
+        </exclusions>
       </dependency>
       <dependency>
         <groupId>org.eclipse.sisu</groupId>