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 withDuplicateProjectExceptionorg.codehaus.plexus.util.dag.CycleDetectedExceptionpublic 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.DuplicateProjectExceptionorg.codehaus.plexus.util.dag.CycleDetectedExceptionpublic List<MavenProject> getAllProjects()
ProjectDependencyGraphgetAllProjects in interface ProjectDependencyGraphpublic List<MavenProject> getSortedProjects()
ProjectDependencyGraphgetSortedProjects in interface ProjectDependencyGraphnull.public List<MavenProject> getDownstreamProjects(MavenProject project, boolean transitive)
ProjectDependencyGraphgetDownstreamProjects in interface ProjectDependencyGraphproject - 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)
ProjectDependencyGraphgetUpstreamProjects in interface ProjectDependencyGraphproject - 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–2021 The Apache Software Foundation. All rights reserved.