mthmulders commented on a change in pull request #651:
URL: https://github.com/apache/maven/pull/651#discussion_r779783453



##########
File path: 
maven-core/src/main/java/org/apache/maven/lifecycle/providers/packaging/AbstractLifecycleMappingProvider.java
##########
@@ -22,50 +22,40 @@
 import java.util.Collections;
 import java.util.HashMap;
 
-import javax.inject.Inject;
-import javax.inject.Named;
 import javax.inject.Provider;
-import javax.inject.Singleton;
 
 import org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping;
 import org.apache.maven.lifecycle.mapping.Lifecycle;
 import org.apache.maven.lifecycle.mapping.LifecycleMapping;
 import org.apache.maven.lifecycle.mapping.LifecyclePhase;
 
-@Named( "pom" )
-@Singleton
-public final class PomLifecycleMappingProvider
+/**
+ * Base lifecycle mapping provider, ie per-packaging plugin bindings for 
{@code default} lifecycle.
+ */
+public abstract class AbstractLifecycleMappingProvider
     implements Provider<LifecycleMapping>
 {
-  private final LifecycleMapping lifecycleMapping;
-
-  @Inject
-  public PomLifecycleMappingProvider()
-  {
-    HashMap<String, LifecyclePhase> lifecyclePhases = new HashMap<>();
-    lifecyclePhases.put(
-        "install",
-        new LifecyclePhase( 
"org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install" )
-    );
-    lifecyclePhases.put(
-        "deploy",
-        new LifecyclePhase( 
"org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy" )
-    );
-
-    Lifecycle lifecycle = new Lifecycle();
-    lifecycle.setId( "default" );
-    lifecycle.setLifecyclePhases( Collections.unmodifiableMap( lifecyclePhases 
) );
-
-    this.lifecycleMapping = new DefaultLifecycleMapping(
-        Collections.singletonList(
-            lifecycle
-        )
-    );
-  }
-
-  @Override
-  public LifecycleMapping get()
-  {
-    return lifecycleMapping;
-  }
+    private final LifecycleMapping lifecycleMapping;
+
+    protected AbstractLifecycleMappingProvider( String[] pluginBindings )

Review comment:
       Makes sense, one improvement at a time... Getting rid of the XML 
descriptors is a big win already!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to