Class Maven2DependencyGraphBuilder

java.lang.Object
org.codehaus.plexus.logging.AbstractLogEnabled
org.apache.maven.shared.dependency.graph.internal.Maven2DependencyGraphBuilder
All Implemented Interfaces:
DependencyGraphBuilder, org.codehaus.plexus.logging.LogEnabled

@Component(role=DependencyGraphBuilder.class, hint="maven2") public class Maven2DependencyGraphBuilder extends org.codehaus.plexus.logging.AbstractLogEnabled implements DependencyGraphBuilder
Wrapper around Maven 2 dependency tree builder.
Since:
2.0
Author:
Hervé Boutemy
See Also:
  • Constructor Details

    • Maven2DependencyGraphBuilder

      public Maven2DependencyGraphBuilder()
  • Method Details

    • buildDependencyGraph

      public DependencyNode buildDependencyGraph(org.apache.maven.project.MavenProject project, org.apache.maven.artifact.resolver.filter.ArtifactFilter filter) throws DependencyGraphBuilderException
      Builds the dependency graph for Maven 2.
      Specified by:
      buildDependencyGraph in interface DependencyGraphBuilder
      Parameters:
      project - the project
      filter - artifact filter (can be null)
      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.MavenProject project, org.apache.maven.artifact.resolver.filter.ArtifactFilter filter, Collection<org.apache.maven.project.MavenProject> reactorProjects) throws DependencyGraphBuilderException
      Builds the dependency graph for Maven 2.

      notice: the reactor projects are ignored as no work has been done to try to do the same hack as with Maven 3.

      Specified by:
      buildDependencyGraph in interface DependencyGraphBuilder
      Parameters:
      project - the project
      filter - artifact filter (can be null)
      reactorProjects - Ignored.
      Returns:
      DependencyNode containing the dependency graph.
      Throws:
      DependencyGraphBuilderException - if some of the dependencies could not be resolved.