You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by cs...@apache.org on 2021/09/26 11:52:18 UTC

[maven] 01/01: Drop plexus-component-metadata plugin from maven-core

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

cstamas pushed a commit to branch drop-core-plexus-component-metadata
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 9a78c08ad94b4626c1de174563a8275971abbe60
Author: Tamas Cservenak <ta...@cservenak.net>
AuthorDate: Sun Sep 26 13:51:15 2021 +0200

    Drop plexus-component-metadata plugin from maven-core
    
    Now that Plexus XMLs (and components) are out, no need
    for this plugin in maven-core module anymore.
    
    This PR contains last Plexus annotation component in
    maven-core converted to JSR330 as well.
---
 maven-core/pom.xml                                        |  4 ----
 .../internal/DefaultLifecyclePluginAnalyzer.java          | 15 +++++++++------
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/maven-core/pom.xml b/maven-core/pom.xml
index 1ff00fa..61d9c31 100644
--- a/maven-core/pom.xml
+++ b/maven-core/pom.xml
@@ -208,10 +208,6 @@ under the License.
     </pluginManagement>
     <plugins>
       <plugin>
-        <groupId>org.codehaus.plexus</groupId>
-        <artifactId>plexus-component-metadata</artifactId>
-      </plugin>
-      <plugin>
         <groupId>org.eclipse.sisu</groupId>
         <artifactId>sisu-maven-plugin</artifactId>
       </plugin>
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java
index f1bb442..cf3c63f 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java
@@ -37,12 +37,14 @@ import org.apache.maven.model.InputLocation;
 import org.apache.maven.model.InputSource;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.model.PluginExecution;
-import org.codehaus.plexus.component.annotations.Component;
-import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.logging.Logger;
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
 
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+
 /**
  * <strong>NOTE:</strong> This class is not part of any public api and can be changed or deleted without prior notice.
  *
@@ -52,20 +54,21 @@ import org.codehaus.plexus.util.xml.Xpp3Dom;
  * @author jdcasey
  * @author Kristian Rosenvold (extracted class only)
  */
-@Component( role = LifeCyclePluginAnalyzer.class )
+@Singleton
+@Named
 public class DefaultLifecyclePluginAnalyzer
     implements LifeCyclePluginAnalyzer
 {
     public static final String DEFAULTLIFECYCLEBINDINGS_MODELID = "org.apache.maven:maven-core:"
         + DefaultLifecyclePluginAnalyzer.class.getPackage().getImplementationVersion() + ":default-lifecycle-bindings";
 
-    @Requirement( role = LifecycleMapping.class )
+    @Inject
     private Map<String, LifecycleMapping> lifecycleMappings;
 
-    @Requirement
+    @Inject
     private DefaultLifecycles defaultLifeCycles;
 
-    @Requirement
+    @Inject
     private Logger logger;
 
     public DefaultLifecyclePluginAnalyzer()