Package org.apache.maven.lifecycle
Class DefaultLifecycleExecutor
- java.lang.Object
-
- org.apache.maven.lifecycle.DefaultLifecycleExecutor
-
- All Implemented Interfaces:
LifecycleExecutor
@Component(role=LifecycleExecutor.class) public class DefaultLifecycleExecutor extends java.lang.Object implements LifecycleExecutor
A facade that provides lifecycle services to components outside maven core. Note that this component is not normally used from within core itself.
-
-
Field Summary
Fields Modifier and Type Field Description private DefaultLifecyclesdefaultLifeCyclesprivate LifecycleExecutionPlanCalculatorlifecycleExecutionPlanCalculatorprivate LifeCyclePluginAnalyzerlifeCyclePluginAnalyzerprivate LifecycleStarterlifecycleStarterprivate LifecycleTaskSegmentCalculatorlifecycleTaskSegmentCalculatorprivate MojoDescriptorCreatormojoDescriptorCreatorprivate MojoExecutormojoExecutor-
Fields inherited from interface org.apache.maven.lifecycle.LifecycleExecutor
ROLE
-
-
Constructor Summary
Constructors Constructor Description DefaultLifecycleExecutor()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description MavenExecutionPlancalculateExecutionPlan(MavenSession session, boolean setup, java.lang.String... tasks)MavenExecutionPlancalculateExecutionPlan(MavenSession session, java.lang.String... tasks)voidcalculateForkedExecutions(MojoExecution mojoExecution, MavenSession session)voidexecute(MavenSession session)java.util.List<MavenProject>executeForkedExecutions(MojoExecution mojoExecution, MavenSession session)(package private) MojoDescriptorgetMojoDescriptor(java.lang.String task, MavenSession session, MavenProject project, java.lang.String invokedVia, boolean canUsePrefix, boolean isOptionalMojo)java.util.Map<java.lang.String,Lifecycle>getPhaseToLifecycleMap()Deprecated.java.util.Set<Plugin>getPluginsBoundByDefaultToAllLifecycles(java.lang.String packaging)
-
-
-
Field Detail
-
lifeCyclePluginAnalyzer
@Requirement private LifeCyclePluginAnalyzer lifeCyclePluginAnalyzer
-
defaultLifeCycles
@Requirement private DefaultLifecycles defaultLifeCycles
-
lifecycleTaskSegmentCalculator
@Requirement private LifecycleTaskSegmentCalculator lifecycleTaskSegmentCalculator
-
lifecycleExecutionPlanCalculator
@Requirement private LifecycleExecutionPlanCalculator lifecycleExecutionPlanCalculator
-
mojoExecutor
@Requirement private MojoExecutor mojoExecutor
-
lifecycleStarter
@Requirement private LifecycleStarter lifecycleStarter
-
mojoDescriptorCreator
@Requirement private MojoDescriptorCreator mojoDescriptorCreator
-
-
Method Detail
-
execute
public void execute(MavenSession session)
- Specified by:
executein interfaceLifecycleExecutor
-
getPluginsBoundByDefaultToAllLifecycles
public java.util.Set<Plugin> getPluginsBoundByDefaultToAllLifecycles(java.lang.String packaging)
- Specified by:
getPluginsBoundByDefaultToAllLifecyclesin interfaceLifecycleExecutor- Returns:
- The plugins bound to the lifecycles of the specified packaging or
nullif the packaging is unknown.
-
getPhaseToLifecycleMap
@Deprecated public java.util.Map<java.lang.String,Lifecycle> getPhaseToLifecycleMap()
Deprecated.
-
getMojoDescriptor
MojoDescriptor getMojoDescriptor(java.lang.String task, MavenSession session, MavenProject project, java.lang.String invokedVia, boolean canUsePrefix, boolean isOptionalMojo) throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException, PluginVersionResolutionException
-
calculateExecutionPlan
public MavenExecutionPlan calculateExecutionPlan(MavenSession session, boolean setup, java.lang.String... tasks) throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException, PluginManagerException, LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException
- Specified by:
calculateExecutionPlanin interfaceLifecycleExecutor- Throws:
PluginNotFoundExceptionPluginResolutionExceptionPluginDescriptorParsingExceptionMojoNotFoundExceptionNoPluginFoundForPrefixExceptionInvalidPluginDescriptorExceptionPluginManagerExceptionLifecyclePhaseNotFoundExceptionLifecycleNotFoundExceptionPluginVersionResolutionException
-
calculateExecutionPlan
public MavenExecutionPlan calculateExecutionPlan(MavenSession session, java.lang.String... tasks) throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException, PluginManagerException, LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException
- Specified by:
calculateExecutionPlanin interfaceLifecycleExecutor- Throws:
PluginNotFoundExceptionPluginResolutionExceptionPluginDescriptorParsingExceptionMojoNotFoundExceptionNoPluginFoundForPrefixExceptionInvalidPluginDescriptorExceptionPluginManagerExceptionLifecyclePhaseNotFoundExceptionLifecycleNotFoundExceptionPluginVersionResolutionException
-
calculateForkedExecutions
public void calculateForkedExecutions(MojoExecution mojoExecution, MavenSession session) throws MojoNotFoundException, PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException, LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException
- Specified by:
calculateForkedExecutionsin interfaceLifecycleExecutor- Throws:
MojoNotFoundExceptionPluginNotFoundExceptionPluginResolutionExceptionPluginDescriptorParsingExceptionNoPluginFoundForPrefixExceptionInvalidPluginDescriptorExceptionLifecyclePhaseNotFoundExceptionLifecycleNotFoundExceptionPluginVersionResolutionException
-
executeForkedExecutions
public java.util.List<MavenProject> executeForkedExecutions(MojoExecution mojoExecution, MavenSession session) throws LifecycleExecutionException
- Specified by:
executeForkedExecutionsin interfaceLifecycleExecutor- Throws:
LifecycleExecutionException
-
-