Class DefaultDependencyGraphBuilder
- java.lang.Object
-
- org.codehaus.plexus.logging.AbstractLogEnabled
-
- org.apache.maven.shared.dependency.graph.internal.DefaultDependencyGraphBuilder
-
- All Implemented Interfaces:
DependencyGraphBuilder,org.codehaus.plexus.logging.LogEnabled,org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
@Component(role=DependencyGraphBuilder.class) public class DefaultDependencyGraphBuilder extends org.codehaus.plexus.logging.AbstractLogEnabled implements DependencyGraphBuilder, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
Default dependency graph builder that detects current Maven version to delegate to either Maven 3.0 or 3.1+ specific code.- Since:
- 2.0
- See Also:
Maven3DependencyGraphBuilder,Maven31DependencyGraphBuilder
-
-
Field Summary
Fields Modifier and Type Field Description protected org.codehaus.plexus.PlexusContainercontainer
-
Constructor Summary
Constructors Constructor Description DefaultDependencyGraphBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DependencyNodebuildDependencyGraph(org.apache.maven.project.ProjectBuildingRequest buildingRequest, org.apache.maven.artifact.resolver.filter.ArtifactFilter filter)Builds a dependency graph.DependencyNodebuildDependencyGraph(org.apache.maven.project.ProjectBuildingRequest buildingRequest, org.apache.maven.artifact.resolver.filter.ArtifactFilter filter, java.util.Collection<org.apache.maven.project.MavenProject> reactorProjects)Builds a dependency graph.private static booleancanFindCoreClass(java.lang.String className)voidcontextualize(org.codehaus.plexus.context.Context context)Injects the Plexus content.protected static booleanisMaven31()
-
-
-
Method Detail
-
buildDependencyGraph
public DependencyNode buildDependencyGraph(org.apache.maven.project.ProjectBuildingRequest buildingRequest, org.apache.maven.artifact.resolver.filter.ArtifactFilter filter) throws DependencyGraphBuilderException
Builds a dependency graph.- Specified by:
buildDependencyGraphin interfaceDependencyGraphBuilder- Parameters:
buildingRequest- the buildingRequestfilter- artifact filter (can benull)- Returns:
- DependencyNode containing the dependency graph.
- Throws:
DependencyGraphBuilderException- if some of the dependencies could not be resolved.
-
buildDependencyGraph
public DependencyNode buildDependencyGraph(org.apache.maven.project.ProjectBuildingRequest buildingRequest, org.apache.maven.artifact.resolver.filter.ArtifactFilter filter, java.util.Collection<org.apache.maven.project.MavenProject> reactorProjects) throws DependencyGraphBuilderException
Builds a dependency graph.- Specified by:
buildDependencyGraphin interfaceDependencyGraphBuilder- Parameters:
filter- artifact filter (can benull)reactorProjects- Collection of those projects contained in the reactor (can benull)buildingRequest- the buildingRequest- Returns:
- DependencyNode containing the dependency graph.
- Throws:
DependencyGraphBuilderException- if some of the dependencies could not be resolved.
-
isMaven31
protected static boolean isMaven31()
- Returns:
- true if the current Maven version is Maven 3.1.
-
canFindCoreClass
private static boolean canFindCoreClass(java.lang.String className)
-
contextualize
public void contextualize(org.codehaus.plexus.context.Context context) throws org.codehaus.plexus.context.ContextExceptionInjects the Plexus content.- Specified by:
contextualizein interfaceorg.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable- Parameters:
context- Plexus context to inject.- Throws:
org.codehaus.plexus.context.ContextException- if the PlexusContainer could not be located.
-
-