protected DependencyNode getRootNodeDependecyTree() throws MojoExecutionException{
    try {
      ArtifactFilter artifactFilter = null;

      // works for only maven 3. Use of dependency graph component not handled for maven 2
      // as current version of NAR already requires Maven 3.x
      rootNode = dependencyGraphBuilder.buildDependencyGraph(getMavenProject(), artifactFilter);

    } catch (DependencyGraphBuilderException exception) {
      throw new MojoExecutionException("Cannot build project dependency graph", exception);
    }

    return rootNode;
  }
protected DependencyNode getRootNodeDependecyTree ( ) throws MojoExecutionException { try { ArtifactFilter artifactFilter = null ; rootNode = dependencyGraphBuilder . buildDependencyGraph ( getMavenProject ( ) , artifactFilter ) ; } catch ( DependencyGraphBuilderException exception ) { throw new MojoExecutionException ( "Cannot build project dependency graph" , exception ) ; } return rootNode ; }
Get root node of the current Maven project Dependency tree generated by
maven.shared dependency graph builder.

@return root node of the project Dependency tree
@throws MojoExecutionException