protected org.eclipse.aether.graph.DependencyNode getVerboseDependencyTree ()
  {
    // Create CollectRequest object that will be submitted to collect the dependencies
    CollectRequest collectReq = new CollectRequest();

    // Get artifact this Maven project is attempting to build
    Artifact art = getMavenProject().getArtifact();
    
    DefaultRepositorySystemSession session = new DefaultRepositorySystemSession(repoSession);

    // Set the No-Op Graph transformer so tree stays intact
    session.setDependencyGraphTransformer(new NoopDependencyGraphTransformer());
    
    // Create Aether graph dependency object from params extracted above
    org.eclipse.aether.graph.Dependency dep = new org.eclipse.aether.graph.Dependency (
      new org.eclipse.aether.artifact.DefaultArtifact(art.getGroupId(), art.getArtifactId (), null, art.getVersion()), null);
    
    // Set the root of the request, in this case the current project will be the root
    collectReq.setRoot(dep);

    // Set the repos the collectReq will hit
    collectReq.setRepositories(projectRepos);

    // Get test scope dependencies if we are in the testCompile phase
    if (this instanceof NarTestCompileMojo)
    {
      DependencySelector dependencySelector = new AndDependencySelector(new OptionalDependencySelector(), new ScopeDependencySelector(null));
      session.setDependencySelector(dependencySelector);
    }

    try {
      return repoSystem.collectDependencies (session, collectReq).getRoot();
    } catch (DependencyCollectionException exception) {
      this.getLog().warn("Could not collect dependencies from repo system", exception);
      return null;
    }
  }
protected org . eclipse . aether . graph . DependencyNode getVerboseDependencyTree ( ) { CollectRequest collectReq = new CollectRequest ( ) ; Artifact art = getMavenProject ( ) . getArtifact ( ) ; DefaultRepositorySystemSession session = new DefaultRepositorySystemSession ( repoSession ) ; session . setDependencyGraphTransformer ( new NoopDependencyGraphTransformer ( ) ) ; org . eclipse . aether . graph . Dependency dep = new org . eclipse . aether . graph . Dependency ( new org . eclipse . aether . artifact . DefaultArtifact ( art . getGroupId ( ) , art . getArtifactId ( ) , null , art . getVersion ( ) ) , null ) ; collectReq . setRoot ( dep ) ; collectReq . setRepositories ( projectRepos ) ; if ( this instanceof NarTestCompileMojo ) { DependencySelector dependencySelector = new AndDependencySelector ( new OptionalDependencySelector ( ) , new ScopeDependencySelector ( null ) ) ; session . setDependencySelector ( dependencySelector ) ; } try { return repoSystem . collectDependencies ( session , collectReq ) . getRoot ( ) ; } catch ( DependencyCollectionException exception ) { this . getLog ( ) . warn ( "Could not collect dependencies from repo system" , exception ) ; return null ; } }
Gets the project's full dependency tree prior to dependency mediation. This is required if
we want to know where to push libraries in the linker line.
@return {@link org.eclipse.aether.graph.DependencyNode Root node} of the projects verbose dependency tree.
@since 3.5.2