Interface DependencyTreeBuilder

  • All Known Implementing Classes:
    DefaultDependencyTreeBuilder

    public interface DependencyTreeBuilder
    Builds a tree of dependencies for a given Maven 2 project. Notice that it doesn't fail with Maven 3, but when Maven 2 and Maven 3 don't calculate the same transitive dependency result, the tree calculated with this component is consistent with Maven 2 even if run with Maven 3 (see MSHARED-167.
    Version:
    $Id: DependencyTreeBuilder.java 1595871 2014-05-19 12:38:45Z jvanzyl $
    Author:
    Mark Hobson
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ROLE
      The plexus role for this component.
    • Field Detail

      • ROLE

        static final java.lang.String ROLE
        The plexus role for this component.
    • Method Detail

      • buildDependencyTree

        DependencyTree buildDependencyTree​(org.apache.maven.project.MavenProject project,
                                           org.apache.maven.artifact.repository.ArtifactRepository repository,
                                           org.apache.maven.artifact.factory.ArtifactFactory factory,
                                           org.apache.maven.artifact.metadata.ArtifactMetadataSource metadataSource,
                                           org.apache.maven.artifact.resolver.ArtifactCollector collector)
                                    throws DependencyTreeBuilderException
        Builds a tree of dependencies for the specified Maven project.
        Parameters:
        project - the Maven project
        repository - the artifact repository to resolve against
        factory - the artifact factory to use
        metadataSource - the artifact metadata source to use
        collector - the artifact collector to use
        Returns:
        the dependency tree of the specified Maven project
        Throws:
        DependencyTreeBuilderException - if the dependency tree cannot be resolved
      • buildDependencyTree

        DependencyNode buildDependencyTree​(org.apache.maven.project.MavenProject project,
                                           org.apache.maven.artifact.repository.ArtifactRepository repository,
                                           org.apache.maven.artifact.factory.ArtifactFactory factory,
                                           org.apache.maven.artifact.metadata.ArtifactMetadataSource metadataSource,
                                           org.apache.maven.artifact.resolver.filter.ArtifactFilter filter,
                                           org.apache.maven.artifact.resolver.ArtifactCollector collector)
                                    throws DependencyTreeBuilderException
        Builds a tree of dependencies for the specified Maven project.
        Parameters:
        project - the Maven project
        repository - the artifact repository to resolve against
        factory - the artifact factory to use
        metadataSource - the artifact metadata source to use
        filter - the artifact filter to use
        collector - the artifact collector to use
        Returns:
        the dependency tree root node of the specified Maven project
        Throws:
        DependencyTreeBuilderException - if the dependency tree cannot be resolved
        Since:
        1.1