org.apache.maven.lifecycle
Class DefaultLifecycleExecutor

java.lang.Object
  extended by org.codehaus.plexus.logging.AbstractLogEnabled
      extended by org.apache.maven.lifecycle.DefaultLifecycleExecutor
All Implemented Interfaces:
LifecycleExecutor, org.codehaus.plexus.logging.LogEnabled

@Component(role=LifecycleExecutor.class)
public class DefaultLifecycleExecutor
extends org.codehaus.plexus.logging.AbstractLogEnabled
implements LifecycleExecutor

Responsible for orchestrating the process of building the ordered list of steps required to achieve the specified set of tasks passed into Maven, then executing these mojos in order. This class also manages the various error messages that may occur during this process, and directing the behavior of the build according to what's specified in MavenExecutionRequest.getReactorFailureBehavior().

Version:
$Id: DefaultLifecycleExecutor.java 726545 2008-12-14 21:50:39Z bentmann $
Author:
Jason van Zyl, Brett Porter, jdcasey

Field Summary
 
Fields inherited from interface org.apache.maven.lifecycle.LifecycleExecutor
ROLE
 
Constructor Summary
DefaultLifecycleExecutor()
           
 
Method Summary
 void execute(MavenSession session, ReactorManager reactorManager, EventDispatcher dispatcher)
          Order and execute mojos associated with the current set of projects in the reactor.
 java.util.List getLifecycles()
           
 TaskValidationResult isTaskValid(java.lang.String task, MavenSession session, MavenProject rootProject)
          Provides a fail-fast way to check that all goals specified in MavenExecutionRequest.getGoals() or MavenSession.getGoals() is valid.
protected  void line()
           
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLifecycleExecutor

public DefaultLifecycleExecutor()
Method Detail

execute

public void execute(MavenSession session,
                    ReactorManager reactorManager,
                    EventDispatcher dispatcher)
             throws BuildFailureException,
                    LifecycleExecutionException
Order and execute mojos associated with the current set of projects in the reactor. Specific lifecycle phases and mojo invocations that determine what phases and mojos this method will attempt to execute are provided in MavenSession.getGoals(), which is populated from MavenExecutionRequest.getGoals().

Specified by:
execute in interface LifecycleExecutor
Throws:
BuildFailureException
LifecycleExecutionException

isTaskValid

public TaskValidationResult isTaskValid(java.lang.String task,
                                        MavenSession session,
                                        MavenProject rootProject)
Provides a fail-fast way to check that all goals specified in MavenExecutionRequest.getGoals() or MavenSession.getGoals() is valid.

Specified by:
isTaskValid in interface LifecycleExecutor

line

protected void line()

getLifecycles

public java.util.List getLifecycles()
Specified by:
getLifecycles in interface LifecycleExecutor


Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.