Class DefaultLifecycleExecutionPlanCalculator
- java.lang.Object
-
- org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator
-
- All Implemented Interfaces:
LifecycleExecutionPlanCalculator
@Component(role=LifecycleExecutionPlanCalculator.class) public class DefaultLifecycleExecutionPlanCalculator extends java.lang.Object implements LifecycleExecutionPlanCalculator
NOTE: This class is not part of any public api and can be changed or deleted without prior notice.- Since:
- 3.0
-
-
Field Summary
Fields Modifier and Type Field Description private DefaultLifecycles
defaultLifeCycles
private java.util.Map<java.lang.String,LifecycleMappingDelegate>
delegates
private LifecyclePluginResolver
lifecyclePluginResolver
private MojoDescriptorCreator
mojoDescriptorCreator
private java.util.Map<java.lang.String,MojoExecutionConfigurator>
mojoExecutionConfigurators
private BuildPluginManager
pluginManager
private PluginVersionResolver
pluginVersionResolver
private LifecycleMappingDelegate
standardDelegate
-
Constructor Summary
Constructors Constructor Description DefaultLifecycleExecutionPlanCalculator()
DefaultLifecycleExecutionPlanCalculator(BuildPluginManager pluginManager, DefaultLifecycles defaultLifeCycles, MojoDescriptorCreator mojoDescriptorCreator, LifecyclePluginResolver lifecyclePluginResolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MavenExecutionPlan
calculateExecutionPlan(MavenSession session, MavenProject project, java.util.List<java.lang.Object> tasks)
MavenExecutionPlan
calculateExecutionPlan(MavenSession session, MavenProject project, java.util.List<java.lang.Object> tasks, boolean setup)
void
calculateForkedExecutions(MojoExecution mojoExecution, MavenSession session)
private void
calculateForkedExecutions(MojoExecution mojoExecution, MavenSession session, MavenProject project, java.util.Collection<MojoDescriptor> alreadyForkedExecutions)
private java.util.List<MojoExecution>
calculateForkedGoal(MojoExecution mojoExecution, MavenSession session, MavenProject project, java.util.Collection<MojoDescriptor> alreadyForkedExecutions)
private java.util.List<MojoExecution>
calculateForkedLifecycle(MojoExecution mojoExecution, MavenSession session, MavenProject project, java.util.Collection<MojoDescriptor> alreadyForkedExecutions)
private java.util.Map<java.lang.String,java.util.List<MojoExecution>>
calculateLifecycleMappings(MavenSession session, MavenProject project, java.lang.String lifecyclePhase)
java.util.List<MojoExecution>
calculateMojoExecutions(MavenSession session, MavenProject project, java.util.List<java.lang.Object> tasks)
private void
finalizeMojoConfiguration(MojoExecution mojoExecution)
Post-processes the effective configuration for the specified mojo execution.private org.codehaus.plexus.util.xml.Xpp3Dom
getMojoConfiguration(MojoDescriptor mojoDescriptor)
private void
injectLifecycleOverlay(java.util.Map<java.lang.String,java.util.List<MojoExecution>> lifecycleMappings, MojoExecution mojoExecution, MavenSession session, MavenProject project)
private MojoExecutionConfigurator
mojoExecutionConfigurator(MojoExecution mojoExecution)
void
setupMojoExecution(MavenSession session, MavenProject project, MojoExecution mojoExecution)
private void
setupMojoExecutions(MavenSession session, MavenProject project, java.util.List<MojoExecution> mojoExecutions)
-
-
-
Field Detail
-
pluginVersionResolver
@Requirement private PluginVersionResolver pluginVersionResolver
-
pluginManager
@Requirement private BuildPluginManager pluginManager
-
defaultLifeCycles
@Requirement private DefaultLifecycles defaultLifeCycles
-
mojoDescriptorCreator
@Requirement private MojoDescriptorCreator mojoDescriptorCreator
-
lifecyclePluginResolver
@Requirement private LifecyclePluginResolver lifecyclePluginResolver
-
standardDelegate
@Requirement(hint="default") private LifecycleMappingDelegate standardDelegate
-
delegates
@Requirement private java.util.Map<java.lang.String,LifecycleMappingDelegate> delegates
-
mojoExecutionConfigurators
@Requirement private java.util.Map<java.lang.String,MojoExecutionConfigurator> mojoExecutionConfigurators
-
-
Constructor Detail
-
DefaultLifecycleExecutionPlanCalculator
public DefaultLifecycleExecutionPlanCalculator()
-
DefaultLifecycleExecutionPlanCalculator
public DefaultLifecycleExecutionPlanCalculator(BuildPluginManager pluginManager, DefaultLifecycles defaultLifeCycles, MojoDescriptorCreator mojoDescriptorCreator, LifecyclePluginResolver lifecyclePluginResolver)
-
-
Method Detail
-
calculateExecutionPlan
public MavenExecutionPlan calculateExecutionPlan(MavenSession session, MavenProject project, java.util.List<java.lang.Object> tasks, boolean setup) throws PluginNotFoundException, PluginResolutionException, LifecyclePhaseNotFoundException, PluginDescriptorParsingException, MojoNotFoundException, InvalidPluginDescriptorException, NoPluginFoundForPrefixException, LifecycleNotFoundException, PluginVersionResolutionException
- Specified by:
calculateExecutionPlan
in interfaceLifecycleExecutionPlanCalculator
- Throws:
PluginNotFoundException
PluginResolutionException
LifecyclePhaseNotFoundException
PluginDescriptorParsingException
MojoNotFoundException
InvalidPluginDescriptorException
NoPluginFoundForPrefixException
LifecycleNotFoundException
PluginVersionResolutionException
-
calculateExecutionPlan
public MavenExecutionPlan calculateExecutionPlan(MavenSession session, MavenProject project, java.util.List<java.lang.Object> tasks) throws PluginNotFoundException, PluginResolutionException, LifecyclePhaseNotFoundException, PluginDescriptorParsingException, MojoNotFoundException, InvalidPluginDescriptorException, NoPluginFoundForPrefixException, LifecycleNotFoundException, PluginVersionResolutionException
- Specified by:
calculateExecutionPlan
in interfaceLifecycleExecutionPlanCalculator
- Throws:
PluginNotFoundException
PluginResolutionException
LifecyclePhaseNotFoundException
PluginDescriptorParsingException
MojoNotFoundException
InvalidPluginDescriptorException
NoPluginFoundForPrefixException
LifecycleNotFoundException
PluginVersionResolutionException
-
setupMojoExecutions
private void setupMojoExecutions(MavenSession session, MavenProject project, java.util.List<MojoExecution> mojoExecutions) throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, MojoNotFoundException, InvalidPluginDescriptorException, NoPluginFoundForPrefixException, LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException
-
setupMojoExecution
public void setupMojoExecution(MavenSession session, MavenProject project, MojoExecution mojoExecution) throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, MojoNotFoundException, InvalidPluginDescriptorException, NoPluginFoundForPrefixException, LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException
- Specified by:
setupMojoExecution
in interfaceLifecycleExecutionPlanCalculator
- Throws:
PluginNotFoundException
PluginResolutionException
PluginDescriptorParsingException
MojoNotFoundException
InvalidPluginDescriptorException
NoPluginFoundForPrefixException
LifecyclePhaseNotFoundException
LifecycleNotFoundException
PluginVersionResolutionException
-
calculateMojoExecutions
public java.util.List<MojoExecution> calculateMojoExecutions(MavenSession session, MavenProject project, java.util.List<java.lang.Object> tasks) throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException, PluginVersionResolutionException, LifecyclePhaseNotFoundException
-
calculateLifecycleMappings
private java.util.Map<java.lang.String,java.util.List<MojoExecution>> calculateLifecycleMappings(MavenSession session, MavenProject project, java.lang.String lifecyclePhase) throws LifecyclePhaseNotFoundException, PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, MojoNotFoundException, InvalidPluginDescriptorException
-
finalizeMojoConfiguration
private void finalizeMojoConfiguration(MojoExecution mojoExecution)
Post-processes the effective configuration for the specified mojo execution. This step discards all parameters from the configuration that are not applicable to the mojo and injects the default values for any missing parameters.- Parameters:
mojoExecution
- The mojo execution whose configuration should be finalized, must not benull
.
-
getMojoConfiguration
private org.codehaus.plexus.util.xml.Xpp3Dom getMojoConfiguration(MojoDescriptor mojoDescriptor)
-
calculateForkedExecutions
public void calculateForkedExecutions(MojoExecution mojoExecution, MavenSession session) throws MojoNotFoundException, PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException, LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException
- Specified by:
calculateForkedExecutions
in interfaceLifecycleExecutionPlanCalculator
- Throws:
MojoNotFoundException
PluginNotFoundException
PluginResolutionException
PluginDescriptorParsingException
NoPluginFoundForPrefixException
InvalidPluginDescriptorException
LifecyclePhaseNotFoundException
LifecycleNotFoundException
PluginVersionResolutionException
-
calculateForkedExecutions
private void calculateForkedExecutions(MojoExecution mojoExecution, MavenSession session, MavenProject project, java.util.Collection<MojoDescriptor> alreadyForkedExecutions) throws MojoNotFoundException, PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException, LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException
-
calculateForkedLifecycle
private java.util.List<MojoExecution> calculateForkedLifecycle(MojoExecution mojoExecution, MavenSession session, MavenProject project, java.util.Collection<MojoDescriptor> alreadyForkedExecutions) throws MojoNotFoundException, PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException, LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException
-
injectLifecycleOverlay
private void injectLifecycleOverlay(java.util.Map<java.lang.String,java.util.List<MojoExecution>> lifecycleMappings, MojoExecution mojoExecution, MavenSession session, MavenProject project) throws PluginDescriptorParsingException, LifecycleNotFoundException, MojoNotFoundException, PluginNotFoundException, PluginResolutionException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException, PluginVersionResolutionException
-
calculateForkedGoal
private java.util.List<MojoExecution> calculateForkedGoal(MojoExecution mojoExecution, MavenSession session, MavenProject project, java.util.Collection<MojoDescriptor> alreadyForkedExecutions) throws MojoNotFoundException, PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException, LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException
-
mojoExecutionConfigurator
private MojoExecutionConfigurator mojoExecutionConfigurator(MojoExecution mojoExecution)
-
-