Class DefaultLifecycleExecutionPlanCalculator
java.lang.Object
org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator
- All Implemented Interfaces:
LifecycleExecutionPlanCalculator
@Component(role=LifecycleExecutionPlanCalculator.class)
public class DefaultLifecycleExecutionPlanCalculator
extends 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
FieldsModifier and TypeFieldDescriptionprivate DefaultLifecycles
private Map<String,
LifecycleMappingDelegate> private LifecyclePluginResolver
private MojoDescriptorCreator
private Map<String,
MojoExecutionConfigurator> private BuildPluginManager
private PluginVersionResolver
private LifecycleMappingDelegate
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultLifecycleExecutionPlanCalculator
(BuildPluginManager pluginManager, DefaultLifecycles defaultLifeCycles, MojoDescriptorCreator mojoDescriptorCreator, LifecyclePluginResolver lifecyclePluginResolver) -
Method Summary
Modifier and TypeMethodDescriptioncalculateExecutionPlan
(MavenSession session, MavenProject project, List<Object> tasks) calculateExecutionPlan
(MavenSession session, MavenProject project, List<Object> tasks, boolean setup) void
calculateForkedExecutions
(MojoExecution mojoExecution, MavenSession session) private void
calculateForkedExecutions
(MojoExecution mojoExecution, MavenSession session, MavenProject project, Collection<MojoDescriptor> alreadyForkedExecutions) private List<MojoExecution>
calculateForkedGoal
(MojoExecution mojoExecution, MavenSession session, MavenProject project, Collection<MojoDescriptor> alreadyForkedExecutions) private List<MojoExecution>
calculateForkedLifecycle
(MojoExecution mojoExecution, MavenSession session, MavenProject project, Collection<MojoDescriptor> alreadyForkedExecutions) private Map<String,
List<MojoExecution>> calculateLifecycleMappings
(MavenSession session, MavenProject project, String lifecyclePhase) calculateMojoExecutions
(MavenSession session, MavenProject project, List<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
(Map<String, 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, List<MojoExecution> mojoExecutions)
-
Field Details
-
pluginVersionResolver
-
pluginManager
-
defaultLifeCycles
-
mojoDescriptorCreator
-
lifecyclePluginResolver
-
standardDelegate
-
delegates
-
mojoExecutionConfigurators
-
-
Constructor Details
-
DefaultLifecycleExecutionPlanCalculator
public DefaultLifecycleExecutionPlanCalculator() -
DefaultLifecycleExecutionPlanCalculator
public DefaultLifecycleExecutionPlanCalculator(BuildPluginManager pluginManager, DefaultLifecycles defaultLifeCycles, MojoDescriptorCreator mojoDescriptorCreator, LifecyclePluginResolver lifecyclePluginResolver)
-
-
Method Details
-
calculateExecutionPlan
public MavenExecutionPlan calculateExecutionPlan(MavenSession session, MavenProject project, List<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, List<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, 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 List<MojoExecution> calculateMojoExecutions(MavenSession session, MavenProject project, List<Object> tasks) throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException, PluginVersionResolutionException, LifecyclePhaseNotFoundException -
calculateLifecycleMappings
private Map<String,List<MojoExecution>> calculateLifecycleMappings(MavenSession session, MavenProject project, String lifecyclePhase) throws LifecyclePhaseNotFoundException, PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, MojoNotFoundException, InvalidPluginDescriptorException -
finalizeMojoConfiguration
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
-
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, Collection<MojoDescriptor> alreadyForkedExecutions) throws MojoNotFoundException, PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException, LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException -
calculateForkedLifecycle
private List<MojoExecution> calculateForkedLifecycle(MojoExecution mojoExecution, MavenSession session, MavenProject project, Collection<MojoDescriptor> alreadyForkedExecutions) throws MojoNotFoundException, PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException, LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException -
injectLifecycleOverlay
private void injectLifecycleOverlay(Map<String, List<MojoExecution>> lifecycleMappings, MojoExecution mojoExecution, MavenSession session, MavenProject project) throws PluginDescriptorParsingException, LifecycleNotFoundException, MojoNotFoundException, PluginNotFoundException, PluginResolutionException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException, PluginVersionResolutionException -
calculateForkedGoal
private List<MojoExecution> calculateForkedGoal(MojoExecution mojoExecution, MavenSession session, MavenProject project, Collection<MojoDescriptor> alreadyForkedExecutions) throws MojoNotFoundException, PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException, LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException -
mojoExecutionConfigurator
-