Package org.apache.maven.execution
Interface ProjectDependencyGraph
- All Known Implementing Classes:
DefaultProjectDependencyGraph
public interface ProjectDependencyGraph
Describes the interdependencies between projects in the reactor.
- Since:
- 3.0-alpha
- Author:
- Benjamin Bentmann
-
Method Summary
Modifier and TypeMethodDescriptionGets all collected projects.getDownstreamProjects
(MavenProject project, boolean transitive) Gets the downstream projects of the specified project.Gets all projects in their intended build order, i.e.getUpstreamProjects
(MavenProject project, boolean transitive) Gets the upstream projects of the specified project.
-
Method Details
-
getAllProjects
List<MavenProject> getAllProjects()Gets all collected projects.- Returns:
- All collected projects.
- Since:
- 3.5.0
-
getSortedProjects
List<MavenProject> getSortedProjects()Gets all projects in their intended build order, i.e. after topologically sorting the projects according to their interdependencies.- Returns:
- The projects in the build order, never
null
.
-
getDownstreamProjects
Gets the downstream projects of the specified project. A downstream project is a project that directly or indirectly depends on the given project.- Parameters:
project
- The project whose downstream projects should be retrieved, must not benull
.transitive
- A flag whether to retrieve all direct and indirect downstream projects or just the immediate downstream projects.- Returns:
- The downstream projects in the build order, never
null
.
-
getUpstreamProjects
Gets the upstream projects of the specified project. An upstream project is a project that directly or indirectly is a prerequisite of the given project.- Parameters:
project
- The project whose upstream projects should be retrieved, must not benull
.transitive
- A flag whether to retrieve all direct and indirect upstream projects or just the immediate upstream projects.- Returns:
- The upstream projects in the build order, never
null
.
-