o Used component annotations where possible

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@944865 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2010-05-16 15:43:21 +00:00
parent dca7e1fffe
commit 1cadde7468
3 changed files with 7 additions and 40 deletions

View File

@ -14,6 +14,8 @@
*/
package org.apache.maven.lifecycle;
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;
@ -32,14 +34,17 @@ import java.util.Set;
*/
// TODO: The configuration for the lifecycle needs to be externalized so that I can use the annotations properly for the
// wiring and reference and external source for the lifecycle configuration.
@Component( role = DefaultLifecycles.class )
public class DefaultLifecycles
{
public static final String[] STANDARD_LIFECYCLES = { "default", "clean", "site" };
// @Configuration(source="org/apache/maven/lifecycle/lifecycles.xml")
@Requirement( role = Lifecycle.class )
private Map<String, Lifecycle> lifecycles;
@Requirement
private Logger logger;
@SuppressWarnings( { "UnusedDeclaration" } )

View File

@ -41,7 +41,8 @@ import java.util.Set;
public class LifecyclePluginAnalyzerImpl
implements LifeCyclePluginAnalyzer
{
@Requirement
@Requirement( role = LifecycleMapping.class )
private Map<String, LifecycleMapping> lifecycleMappings;
@Requirement
@ -50,7 +51,6 @@ public class LifecyclePluginAnalyzerImpl
@Requirement
private Logger logger;
public LifecyclePluginAnalyzerImpl()
{
}

View File

@ -17,26 +17,6 @@
-->
<component-set>
<components>
<component>
<role>org.apache.maven.plugin.MavenPluginCollector</role>
<implementation>org.apache.maven.plugin.MavenPluginCollector
</implementation>
</component>
<component>
<role>org.apache.maven.lifecycle.DefaultLifecycles</role>
<implementation>org.apache.maven.lifecycle.DefaultLifecycles</implementation>
<requirements>
<requirement>
<role>org.codehaus.plexus.logging.Logger</role>
<field-name>logger</field-name>
</requirement>
<requirement>
<role>org.apache.maven.lifecycle.Lifecycle</role>
<field-name>lifecycles</field-name>
</requirement>
</requirements>
</component>
<component>
<role>org.apache.maven.lifecycle.DefaultSchedules</role>
<implementation>org.apache.maven.lifecycle.DefaultSchedules</implementation>
@ -141,24 +121,6 @@
</default-phases>
</configuration>
</component>
<component>
<role>org.apache.maven.lifecycle.LifeCyclePluginAnalyzer</role>
<implementation>org.apache.maven.lifecycle.internal.LifecyclePluginAnalyzerImpl</implementation>
<requirements>
<requirement>
<role>org.apache.maven.lifecycle.DefaultLifecycles</role>
</requirement>
<requirement>
<role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
<field-name>lifecycleMappings</field-name>
</requirement>
<requirement>
<role>org.codehaus.plexus.logging.Logger</role>
<role-hint>default</role-hint>
<field-name>logger</field-name>
</requirement>
</requirements>
</component>
<component>
<role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher