public class DefaultProjectDependencyGraph extends Object implements ProjectDependencyGraph
Constructor and Description |
---|
DefaultProjectDependencyGraph(Collection<MavenProject> projects)
Creates a new project dependency graph based on the specified projects.
|
Modifier and Type | Method and Description |
---|---|
List<MavenProject> |
getDownstreamProjects(MavenProject project,
boolean transitive)
Gets the downstream projects of the specified project.
|
List<MavenProject> |
getSortedProjects()
Gets all projects in their intended build order, i.e.
|
List<MavenProject> |
getUpstreamProjects(MavenProject project,
boolean transitive)
Gets the upstream projects of the specified project.
|
String |
toString() |
public DefaultProjectDependencyGraph(Collection<MavenProject> projects) throws CycleDetectedException, DuplicateProjectException
projects
- The projects to create the dependency graph withDuplicateProjectException
CycleDetectedException
public List<MavenProject> getSortedProjects()
ProjectDependencyGraph
getSortedProjects
in interface ProjectDependencyGraph
null
.public List<MavenProject> getDownstreamProjects(MavenProject project, boolean transitive)
ProjectDependencyGraph
getDownstreamProjects
in interface ProjectDependencyGraph
project
- The project whose downstream projects should be retrieved, must not be null
.transitive
- A flag whether to retrieve all direct and indirect downstream projects or just the immediate
downstream projects.null
.public List<MavenProject> getUpstreamProjects(MavenProject project, boolean transitive)
ProjectDependencyGraph
getUpstreamProjects
in interface ProjectDependencyGraph
project
- The project whose upstream projects should be retrieved, must not be null
.transitive
- A flag whether to retrieve all direct and indirect upstream projects or just the immediate
upstream projects.null
.Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.