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 TypeClassDescription(package private) static class
(package private) static class
private 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 MojoExecutor.OwnerReentrantReadWriteLock
private org.codehaus.plexus.PlexusContainer
private ExecutionEventCatapult
private LifecycleDependencyResolver
private static final org.slf4j.Logger
private MavenPluginManager
private final Map<Thread,
MojoDescriptor> 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) private void
doExecute2
(MavenSession session, MojoExecution mojoExecution) 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) private 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>
private static void
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
pluginManager
-
mavenPluginManager
-
lifeCycleDependencyResolver
-
eventCatapult
-
aggregatorLock
-
container
@Requirement private org.codehaus.plexus.PlexusContainer container -
mojos
-
-
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
private 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
-
warn
-
doExecute
private void doExecute(MavenSession session, MojoExecution mojoExecution, ProjectIndex projectIndex, DependencyContext dependencyContext) throws LifecycleExecutionException - Throws:
LifecycleExecutionException
-
doExecute2
private void doExecute2(MavenSession session, MojoExecution mojoExecution) 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
-