Class MojoExecutor
java.lang.Object
org.apache.maven.lifecycle.internal.MojoExecutor
Executes an individual mojo
NOTE: This class is not part of any public api and can be changed or deleted without prior notice.- Since:
- 3.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
Aggregating mojo executions (possibly) modify all MavenProjects, including those that are currently in use by concurrently running mojo executions. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ReadWriteLock
private ExecutionEventCatapult
private LifecycleDependencyResolver
private MavenPluginManager
private BuildPluginManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
collectDependencyRequirements
(Set<String> scopesToResolve, Set<String> scopesToCollect, Collection<MojoExecution> mojoExecutions) private void
doExecute
(MavenSession session, MojoExecution mojoExecution, ProjectIndex projectIndex, DependencyContext dependencyContext) void
ensureDependenciesAreResolved
(MojoDescriptor mojoDescriptor, MavenSession session, DependencyContext dependencyContext) void
execute
(MavenSession session, List<MojoExecution> mojoExecutions, ProjectIndex projectIndex) private void
execute
(MavenSession session, MojoExecution mojoExecution, ProjectIndex projectIndex, DependencyContext dependencyContext) void
execute
(MavenSession session, MojoExecution mojoExecution, ProjectIndex projectIndex, DependencyContext dependencyContext, PhaseRecorder phaseRecorder) executeForkedExecutions
(MojoExecution mojoExecution, MavenSession session, ProjectIndex projectIndex) private ArtifactFilter
getArtifactFilter
(MojoDescriptor mojoDescriptor) newDependencyContext
(MavenSession session, List<MojoExecution> mojoExecutions) private Collection<String>
-
Field Details
-
pluginManager
-
mavenPluginManager
-
lifeCycleDependencyResolver
-
eventCatapult
-
aggregatorLock
-
-
Constructor Details
-
MojoExecutor
public MojoExecutor()
-
-
Method Details
-
newDependencyContext
public DependencyContext newDependencyContext(MavenSession session, List<MojoExecution> mojoExecutions) -
collectDependencyRequirements
private void collectDependencyRequirements(Set<String> scopesToResolve, Set<String> scopesToCollect, Collection<MojoExecution> mojoExecutions) -
toScopes
-
execute
public void execute(MavenSession session, List<MojoExecution> mojoExecutions, ProjectIndex projectIndex) throws LifecycleExecutionException - Throws:
LifecycleExecutionException
-
execute
public void execute(MavenSession session, MojoExecution mojoExecution, ProjectIndex projectIndex, DependencyContext dependencyContext, PhaseRecorder phaseRecorder) throws LifecycleExecutionException - Throws:
LifecycleExecutionException
-
execute
private void execute(MavenSession session, MojoExecution mojoExecution, ProjectIndex projectIndex, DependencyContext dependencyContext) throws LifecycleExecutionException - Throws:
LifecycleExecutionException
-
doExecute
private void doExecute(MavenSession session, MojoExecution mojoExecution, ProjectIndex projectIndex, DependencyContext dependencyContext) throws LifecycleExecutionException - Throws:
LifecycleExecutionException
-
ensureDependenciesAreResolved
public void ensureDependenciesAreResolved(MojoDescriptor mojoDescriptor, MavenSession session, DependencyContext dependencyContext) throws LifecycleExecutionException - Throws:
LifecycleExecutionException
-
getArtifactFilter
-
executeForkedExecutions
public List<MavenProject> executeForkedExecutions(MojoExecution mojoExecution, MavenSession session, ProjectIndex projectIndex) throws LifecycleExecutionException - Throws:
LifecycleExecutionException
-