Class MultiThreadedBuilder
- java.lang.Object
-
- org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder
-
- All Implemented Interfaces:
Builder
@Component(role=Builder.class, hint="multithreaded") public class MultiThreadedBuilder extends java.lang.Object implements Builder
Builds the full lifecycle in weave-mode (phase by phase as opposed to project-by-project).This builder uses a number of threads equal to the minimum of the degree of concurrency (which is the thread count set with
NOTE: This class is not part of any public api and can be changed or deleted without prior notice.-T
on the command-line) and the number of projects to build. As such, building a single project will always result in a sequential build, regardless of the thread count.- Since:
- 3.0
-
-
Field Summary
Fields Modifier and Type Field Description private LifecycleModuleBuilder
lifecycleModuleBuilder
private org.codehaus.plexus.logging.Logger
logger
-
Constructor Summary
Constructors Constructor Description MultiThreadedBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
build(MavenSession session, ReactorContext reactorContext, ProjectBuildList projectBuilds, java.util.List<TaskSegment> taskSegments, ReactorBuildStatus reactorBuildStatus)
private java.util.concurrent.Callable<ProjectSegment>
createBuildCallable(MavenSession rootSession, ProjectSegment projectBuild, ReactorContext reactorContext, TaskSegment taskSegment, ThreadOutputMuxer muxer, java.util.Set<java.lang.String> duplicateArtifactIds)
private java.util.Set<java.lang.String>
gatherDuplicateArtifactIds(java.util.Set<MavenProject> projects)
private void
multiThreadedProjectTaskSegmentBuild(ConcurrencyDependencyGraph analyzer, ReactorContext reactorContext, MavenSession rootSession, java.util.concurrent.CompletionService<ProjectSegment> service, TaskSegment taskSegment, java.util.Map<MavenProject,ProjectSegment> projectBuildList, ThreadOutputMuxer muxer)
-
-
-
Field Detail
-
logger
@Requirement private org.codehaus.plexus.logging.Logger logger
-
lifecycleModuleBuilder
@Requirement private LifecycleModuleBuilder lifecycleModuleBuilder
-
-
Method Detail
-
build
public void build(MavenSession session, ReactorContext reactorContext, ProjectBuildList projectBuilds, java.util.List<TaskSegment> taskSegments, ReactorBuildStatus reactorBuildStatus) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
-
multiThreadedProjectTaskSegmentBuild
private void multiThreadedProjectTaskSegmentBuild(ConcurrencyDependencyGraph analyzer, ReactorContext reactorContext, MavenSession rootSession, java.util.concurrent.CompletionService<ProjectSegment> service, TaskSegment taskSegment, java.util.Map<MavenProject,ProjectSegment> projectBuildList, ThreadOutputMuxer muxer)
-
createBuildCallable
private java.util.concurrent.Callable<ProjectSegment> createBuildCallable(MavenSession rootSession, ProjectSegment projectBuild, ReactorContext reactorContext, TaskSegment taskSegment, ThreadOutputMuxer muxer, java.util.Set<java.lang.String> duplicateArtifactIds)
-
gatherDuplicateArtifactIds
private java.util.Set<java.lang.String> gatherDuplicateArtifactIds(java.util.Set<MavenProject> projects)
-
-