Class DefaultLifecycleExecutionPlanCalculator
java.lang.Object
org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator
- All Implemented Interfaces:
LifecycleExecutionPlanCalculator
@Named
@Singleton
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 final DefaultLifecyclesprivate final Map<String, LifecycleMappingDelegate> private final LifecyclePluginResolverprivate final MojoDescriptorCreatorprivate final Map<String, MojoExecutionConfigurator> private final BuildPluginManagerprivate final LifecycleMappingDelegate -
Constructor Summary
ConstructorsConstructorDescriptionDefaultLifecycleExecutionPlanCalculator(BuildPluginManager pluginManager, DefaultLifecycles defaultLifecycles, MojoDescriptorCreator mojoDescriptorCreator, LifecyclePluginResolver lifecyclePluginResolver) DefaultLifecycleExecutionPlanCalculator(BuildPluginManager pluginManager, DefaultLifecycles defaultLifecycles, MojoDescriptorCreator mojoDescriptorCreator, LifecyclePluginResolver lifecyclePluginResolver, LifecycleMappingDelegate standardDelegate, Map<String, LifecycleMappingDelegate> delegates, Map<String, MojoExecutionConfigurator> mojoExecutionConfigurators) -
Method Summary
Modifier and TypeMethodDescriptioncalculateExecutionPlan(MavenSession session, MavenProject project, List<Task> tasks) calculateExecutionPlan(MavenSession session, MavenProject project, List<Task> tasks, boolean setup) voidcalculateForkedExecutions(MojoExecution mojoExecution, MavenSession session) private voidcalculateForkedExecutions(MojoExecution mojoExecution, MavenSession session, MavenProject project, Collection<MojoDescriptor> alreadyPlannedExecutions) private List<MojoExecution> calculateForkedGoal(MojoExecution mojoExecution, MavenSession session, MavenProject project, Collection<MojoDescriptor> alreadyPlannedExecutions) private List<MojoExecution> calculateForkedLifecycle(MojoExecution mojoExecution, MavenSession session, MavenProject project, Collection<MojoDescriptor> alreadyPlannedExecutions) private Map<String, List<MojoExecution>> calculateLifecycleMappings(MavenSession session, MavenProject project, String lifecyclePhase) calculateMojoExecutions(MavenSession session, MavenProject project, List<Task> tasks) private MojoDescriptorfillMojoDescriptor(MavenSession session, MavenProject project, MojoExecution execution) private Set<MojoDescriptor> fillMojoDescriptors(MavenSession session, MavenProject project, List<MojoExecution> mojoExecutions) private voidfinalizeMojoConfiguration(MojoExecution mojoExecution) Post-processes the effective configuration for the specified mojo execution.private XmlNodegetMojoConfiguration(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, Set<MojoDescriptor> alreadyPlannedExecutions) private voidsetupMojoExecutions(MavenSession session, MavenProject project, List<MojoExecution> mojoExecutions)
-
Field Details
-
pluginManager
-
defaultLifecycles
-
mojoDescriptorCreator
-
lifecyclePluginResolver
-
standardDelegate
-
delegates
-
mojoExecutionConfigurators
-
-
Constructor Details
-
DefaultLifecycleExecutionPlanCalculator
@Inject public DefaultLifecycleExecutionPlanCalculator(BuildPluginManager pluginManager, DefaultLifecycles defaultLifecycles, MojoDescriptorCreator mojoDescriptorCreator, LifecyclePluginResolver lifecyclePluginResolver, @Named("default") LifecycleMappingDelegate standardDelegate, Map<String, LifecycleMappingDelegate> delegates, Map<String, MojoExecutionConfigurator> mojoExecutionConfigurators) -
DefaultLifecycleExecutionPlanCalculator
public DefaultLifecycleExecutionPlanCalculator(BuildPluginManager pluginManager, DefaultLifecycles defaultLifecycles, MojoDescriptorCreator mojoDescriptorCreator, LifecyclePluginResolver lifecyclePluginResolver)
-
-
Method Details
-
calculateExecutionPlan
public MavenExecutionPlan calculateExecutionPlan(MavenSession session, MavenProject project, List<Task> 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<Task> 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 -
fillMojoDescriptors
private Set<MojoDescriptor> fillMojoDescriptors(MavenSession session, MavenProject project, List<MojoExecution> mojoExecutions) throws InvalidPluginDescriptorException, MojoNotFoundException, PluginResolutionException, PluginDescriptorParsingException, PluginNotFoundException -
fillMojoDescriptor
private MojoDescriptor fillMojoDescriptor(MavenSession session, MavenProject project, MojoExecution execution) throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, MojoNotFoundException, InvalidPluginDescriptorException -
setupMojoExecution
public void setupMojoExecution(MavenSession session, MavenProject project, MojoExecution mojoExecution, Set<MojoDescriptor> alreadyPlannedExecutions) 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<Task> 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> alreadyPlannedExecutions) throws MojoNotFoundException, PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException, LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException -
calculateForkedLifecycle
private List<MojoExecution> calculateForkedLifecycle(MojoExecution mojoExecution, MavenSession session, MavenProject project, Collection<MojoDescriptor> alreadyPlannedExecutions) 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> alreadyPlannedExecutions) throws MojoNotFoundException, PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException, LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException -
mojoExecutionConfigurator
-