Class ProjectSegment
- java.lang.Object
-
- org.apache.maven.lifecycle.internal.ProjectSegment
-
public final class ProjectSegment extends java.lang.ObjectA build context that matches a mavenproject to a given tasksegment, and the session to be used.A note to the reader;
There are several issues/discussions regarding how "aggregator" plugins should be handled. Read for instance http://docs.codehaus.org/display/MAVEN/Deterministic+Lifecycle+Planning
In their current implementation they are "bolted" onto the lifecycle by separating them into TaskSegments. This class represents the execution context of one such task segment.
Wise voices have suggested that maybe aggregators shouldn't be bound to the ordinary lifecycle at all, in which case we wouldn't be needing this class at all ( and ProjectBuildList.getByTaskSegments). Or maybe they should be introduced in the calculation of the execution plan instead, which seems much nicer.
Additionally this class contains a clone of the MavenSession, which is *only* needed because it has as notion of a "current" project.
NOTE: This class is not part of any public api and can be changed or deleted without prior notice.- Since:
- 3.0
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<MavenProject>nonTransitiveUpstreamProjectsprivate MavenProjectprojectprivate MavenSessionsessionprivate TaskSegmenttaskSegmentprivate java.util.List<MavenProject>transitiveUpstreamProjects
-
Constructor Summary
Constructors Constructor Description ProjectSegment(MavenProject project, TaskSegment taskSegment, MavenSession copiedSession)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<MavenProject>getImmediateUpstreamProjects()MavenProjectgetProject()MavenSessiongetSession()TaskSegmentgetTaskSegment()java.util.List<MavenProject>getTransitiveUpstreamProjects()java.lang.StringtoString()
-
-
-
Field Detail
-
project
private final MavenProject project
-
taskSegment
private final TaskSegment taskSegment
-
session
private final MavenSession session
-
nonTransitiveUpstreamProjects
private final java.util.List<MavenProject> nonTransitiveUpstreamProjects
-
transitiveUpstreamProjects
private final java.util.List<MavenProject> transitiveUpstreamProjects
-
-
Constructor Detail
-
ProjectSegment
public ProjectSegment(MavenProject project, TaskSegment taskSegment, MavenSession copiedSession)
-
-
Method Detail
-
getSession
public MavenSession getSession()
-
getProject
public MavenProject getProject()
-
getTaskSegment
public TaskSegment getTaskSegment()
-
getImmediateUpstreamProjects
public java.util.List<MavenProject> getImmediateUpstreamProjects()
-
getTransitiveUpstreamProjects
public java.util.List<MavenProject> getTransitiveUpstreamProjects()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-