Return-Path: Delivered-To: apmail-maven-commits-archive@www.apache.org Received: (qmail 21242 invoked from network); 28 Nov 2008 22:03:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Nov 2008 22:03:36 -0000 Received: (qmail 78172 invoked by uid 500); 28 Nov 2008 22:03:47 -0000 Delivered-To: apmail-maven-commits-archive@maven.apache.org Received: (qmail 78094 invoked by uid 500); 28 Nov 2008 22:03:47 -0000 Mailing-List: contact commits-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list commits@maven.apache.org Received: (qmail 78085 invoked by uid 99); 28 Nov 2008 22:03:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Nov 2008 14:03:47 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Nov 2008 22:02:28 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 09C4423888A4; Fri, 28 Nov 2008 14:02:45 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@maven.apache.org From: jvanzyl@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081128220245.09C4423888A4@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 @@ - - - org.apache.maven.Maven - org.apache.maven.DefaultMaven - - - org.apache.maven.project.MavenProjectBuilder - - - org.apache.maven.lifecycle.LifecycleExecutor - - - org.apache.maven.execution.RuntimeInformation - - - - + org.apache.maven.execution.RuntimeInformation org.apache.maven.execution.DefaultRuntimeInformation