Interface DependencyGraphBuilder

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      DependencyNode buildDependencyGraph​(org.apache.maven.project.ProjectBuildingRequest buildingRequest, org.apache.maven.artifact.resolver.filter.ArtifactFilter filter)
      Build the dependency graph.
      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)
      Build the dependency graph, with a hack to include dependencies contained in the reactor projects but that are not yet compiled, which is the minimum prerequisite for Maven core's ReactorReader to find them.
    • Method Detail

      • buildDependencyGraph

        DependencyNode buildDependencyGraph​(org.apache.maven.project.ProjectBuildingRequest buildingRequest,
                                            org.apache.maven.artifact.resolver.filter.ArtifactFilter filter)
                                     throws DependencyGraphBuilderException
        Build the dependency graph.
        Parameters:
        buildingRequest - the buildingRequest
        filter - artifact filter (can be null)
        Returns:
        the dependency graph
        Throws:
        DependencyGraphBuilderException - if some of the dependencies could not be resolved.
      • buildDependencyGraph

        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
        Build the dependency graph, with a hack to include dependencies contained in the reactor projects but that are not yet compiled, which is the minimum prerequisite for Maven core's ReactorReader to find them. Notice that this hack hasn't been done for Maven 2.

        Notice: If Maven core did collect instead of resolving dependencies (ie did not try to get the artifacts but only the poms), probably this hack wouldn't be necessary even for people requiring the dependency graph before compiling. TODO: for Maven 3, use Aether to collect dependencies.

        Parameters:
        buildingRequest - the buildingRequest
        filter - artifact filter (can be null)
        reactorProjects - Collection of those projects contained in the reactor (can be null).
        Returns:
        the dependency graph
        Throws:
        DependencyGraphBuilderException - if some of the dependencies could not be resolved.