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.
|
DefaultProjectDependencyGraph(List<MavenProject> allProjects,
Collection<MavenProject> projects)
Creates a new project dependency graph based on the specified projects.
|
Modifier and Type | Method and Description |
---|---|
List<MavenProject> |
getAllProjects()
Gets all collected projects.
|
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 org.codehaus.plexus.util.dag.CycleDetectedException, DuplicateProjectException
projects
- The projects to create the dependency graph withDuplicateProjectException
org.codehaus.plexus.util.dag.CycleDetectedException
public DefaultProjectDependencyGraph(List<MavenProject> allProjects, Collection<MavenProject> projects) throws org.codehaus.plexus.util.dag.CycleDetectedException, DuplicateProjectException
allProjects
- All collected projects.projects
- The projects to create the dependency graph with.DuplicateProjectException
org.codehaus.plexus.util.dag.CycleDetectedException
public List<MavenProject> getAllProjects()
ProjectDependencyGraph
getAllProjects
in interface ProjectDependencyGraph
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–2022 The Apache Software Foundation. All rights reserved.