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 Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    buildDependencyGraph(org.apache.maven.project.MavenProject project, org.apache.maven.artifact.resolver.filter.ArtifactFilter filter)
    Builds the dependency graph for Maven 2.
    buildDependencyGraph(org.apache.maven.project.MavenProject project, org.apache.maven.artifact.resolver.filter.ArtifactFilter filter, Collection<org.apache.maven.project.MavenProject> reactorProjects)
    Builds the dependency graph for Maven 2.

    Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled

    enableLogging, getLogger, setupLogger, setupLogger, setupLogger

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.