maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r721569 - in /maven/components/trunk/maven-core/src/main: java/org/apache/maven/DefaultMaven.java resources/META-INF/plexus/components.xml
Date Fri, 28 Nov 2008 22:02:44 GMT
Author: jvanzyl
Date: Fri Nov 28 14:02:44 2008
New Revision: 721569

URL: http://svn.apache.org/viewvc?rev=721569&view=rev
Log:
o using annotations for DefaultMaven, remove hand-made entry

Modified:
    maven/components/trunk/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
    maven/components/trunk/maven-core/src/main/resources/META-INF/plexus/components.xml

Modified: maven/components/trunk/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/main/java/org/apache/maven/DefaultMaven.java?rev=721569&r1=721568&r2=721569&view=diff
==============================================================================
--- maven/components/trunk/maven-core/src/main/java/org/apache/maven/DefaultMaven.java (original)
+++ maven/components/trunk/maven-core/src/main/java/org/apache/maven/DefaultMaven.java Fri
Nov 28 14:02:44 2008
@@ -20,59 +20,62 @@
  */
 
 
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+
 import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
-import org.apache.maven.execution.*;
+import org.apache.maven.execution.DefaultMavenExecutionResult;
+import org.apache.maven.execution.DuplicateProjectException;
+import org.apache.maven.execution.MavenExecutionRequest;
+import org.apache.maven.execution.MavenExecutionResult;
+import org.apache.maven.execution.MavenSession;
+import org.apache.maven.execution.ReactorManager;
+import org.apache.maven.execution.RuntimeInformation;
 import org.apache.maven.lifecycle.LifecycleExecutionException;
 import org.apache.maven.lifecycle.LifecycleExecutor;
 import org.apache.maven.lifecycle.TaskValidationResult;
 import org.apache.maven.monitor.event.DeprecationEventDispatcher;
 import org.apache.maven.monitor.event.EventDispatcher;
 import org.apache.maven.monitor.event.MavenEvents;
-import org.apache.maven.execution.DuplicateProjectException;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.MavenProjectBuilder;
 import org.apache.maven.project.ProjectBuildingException;
 import org.apache.maven.reactor.MavenExecutionException;
 import org.apache.maven.reactor.MissingModuleException;
-import org.codehaus.plexus.PlexusConstants;
 import org.codehaus.plexus.PlexusContainer;
-import org.codehaus.plexus.context.Context;
-import org.codehaus.plexus.context.ContextException;
+import org.codehaus.plexus.component.annotations.Component;
+import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.logging.LogEnabled;
 import org.codehaus.plexus.logging.Logger;
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
 import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.Os;
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.dag.CycleDetectedException;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.List;
-
 /**
- * @author jason van zyl
+ * @author Jason van Zyl
  * @version $Id$
  * @todo EventDispatcher should be a component as it is internal to maven.
  */
+@Component(role = Maven.class)
 public class DefaultMaven
-    implements Maven,
-    Contextualizable, LogEnabled
+    implements Maven, LogEnabled
 {
-    // ----------------------------------------------------------------------
-    // Components
-    // ----------------------------------------------------------------------
-
+    @Requirement
     protected MavenProjectBuilder projectBuilder;
-
+    
+    @Requirement
     protected LifecycleExecutor lifecycleExecutor;
 
+    @Requirement
     protected PlexusContainer container;
 
+    @Requirement
     protected RuntimeInformation runtimeInformation;
 
     private Logger logger;
@@ -388,16 +391,6 @@
         return session;
     }
 
-    // ----------------------------------------------------------------------
-    // Lifecylce Management
-    // ----------------------------------------------------------------------
-
-    public void contextualize( Context context )
-        throws ContextException
-    {
-        container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
-    }
-
     private List getProjectFiles( MavenExecutionRequest request )
         throws IOException
     {

Modified: maven/components/trunk/maven-core/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/main/resources/META-INF/plexus/components.xml?rev=721569&r1=721568&r2=721569&view=diff
==============================================================================
--- maven/components/trunk/maven-core/src/main/resources/META-INF/plexus/components.xml (original)
+++ maven/components/trunk/maven-core/src/main/resources/META-INF/plexus/components.xml Fri
Nov 28 14:02:44 2008
@@ -291,23 +291,7 @@
         </requirement>
       </requirements>
     </component>
-
-    <component>
-      <role>org.apache.maven.Maven</role>
-      <implementation>org.apache.maven.DefaultMaven</implementation>
-      <requirements>
-        <requirement>
-          <role>org.apache.maven.project.MavenProjectBuilder</role>
-        </requirement>
-        <requirement>
-          <role>org.apache.maven.lifecycle.LifecycleExecutor</role>
-        </requirement>
-        <requirement>
-          <role>org.apache.maven.execution.RuntimeInformation</role>
-        </requirement>
-      </requirements>
-    </component>
-
+    
     <component>
       <role>org.apache.maven.execution.RuntimeInformation</role>
       <implementation>org.apache.maven.execution.DefaultRuntimeInformation</implementation>



Mime
View raw message