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 DefaultLifecyclesprivate Map<String, LifecycleMappingDelegate> private LifecyclePluginResolverprivate MojoDescriptorCreatorprivate Map<String, MojoExecutionConfigurator> private BuildPluginManagerprivate PluginVersionResolverprivate 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) voidcalculateForkedExecutions(MojoExecution mojoExecution, MavenSession session) private voidcalculateForkedExecutions(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 voidfinalizeMojoConfiguration(MojoExecution mojoExecution) Post-processes the effective configuration for the specified mojo execution.private org.codehaus.plexus.util.xml.Xpp3DomgetMojoConfiguration(MojoDescriptor mojoDescriptor) private voidinjectLifecycleOverlay(Map<String, List<MojoExecution>> lifecycleMappings, MojoExecution mojoExecution, MavenSession session, MavenProject project) private MojoExecutionConfiguratormojoExecutionConfigurator(MojoExecution mojoExecution) voidsetupMojoExecution(MavenSession session, MavenProject project, MojoExecution mojoExecution) private voidsetupMojoExecutions(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:
calculateExecutionPlanin interfaceLifecycleExecutionPlanCalculator- Throws:
PluginNotFoundExceptionPluginResolutionExceptionLifecyclePhaseNotFoundExceptionPluginDescriptorParsingExceptionMojoNotFoundExceptionInvalidPluginDescriptorExceptionNoPluginFoundForPrefixExceptionLifecycleNotFoundExceptionPluginVersionResolutionException
-
calculateExecutionPlan
public MavenExecutionPlan calculateExecutionPlan(MavenSession session, MavenProject project, List<Object> tasks) throws PluginNotFoundException, PluginResolutionException, LifecyclePhaseNotFoundException, PluginDescriptorParsingException, MojoNotFoundException, InvalidPluginDescriptorException, NoPluginFoundForPrefixException, LifecycleNotFoundException, PluginVersionResolutionException - Specified by:
calculateExecutionPlanin interfaceLifecycleExecutionPlanCalculator- Throws:
PluginNotFoundExceptionPluginResolutionExceptionLifecyclePhaseNotFoundExceptionPluginDescriptorParsingExceptionMojoNotFoundExceptionInvalidPluginDescriptorExceptionNoPluginFoundForPrefixExceptionLifecycleNotFoundExceptionPluginVersionResolutionException
-
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:
setupMojoExecutionin interfaceLifecycleExecutionPlanCalculator- Throws:
PluginNotFoundExceptionPluginResolutionExceptionPluginDescriptorParsingExceptionMojoNotFoundExceptionInvalidPluginDescriptorExceptionNoPluginFoundForPrefixExceptionLifecyclePhaseNotFoundExceptionLifecycleNotFoundExceptionPluginVersionResolutionException
-
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:
calculateForkedExecutionsin interfaceLifecycleExecutionPlanCalculator- Throws:
MojoNotFoundExceptionPluginNotFoundExceptionPluginResolutionExceptionPluginDescriptorParsingExceptionNoPluginFoundForPrefixExceptionInvalidPluginDescriptorExceptionLifecyclePhaseNotFoundExceptionLifecycleNotFoundExceptionPluginVersionResolutionException
-
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
-