org.apache.maven.report.projectinfo.dependencies
Class Dependencies

java.lang.Object
  extended by org.apache.maven.report.projectinfo.dependencies.Dependencies

public class Dependencies
extends Object

Since:
2.1
Version:
$Id: Dependencies.java 890109 2009-12-13 19:57:28Z ltheussl $

Constructor Summary
Dependencies(org.apache.maven.project.MavenProject project, org.apache.maven.shared.dependency.tree.DependencyNode dependencyTreeNode, org.apache.maven.shared.jar.classes.JarClassesAnalysis classesAnalyzer)
          Default constructor
 
Method Summary
 List getAllDependencies()
           
 Map getDependenciesByScope(boolean isTransitively)
           
 org.apache.maven.shared.jar.JarData getJarDependencyDetails(org.apache.maven.artifact.Artifact artifact)
           
 org.apache.maven.project.MavenProject getProject()
          Getter for the project
 List getProjectDependencies()
           
 List getTransitiveDependencies()
           
 boolean hasDependencies()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dependencies

public Dependencies(org.apache.maven.project.MavenProject project,
                    org.apache.maven.shared.dependency.tree.DependencyNode dependencyTreeNode,
                    org.apache.maven.shared.jar.classes.JarClassesAnalysis classesAnalyzer)
Default constructor

Parameters:
project - the MavenProject.
dependencyTreeNode - the DependencyNode.
classesAnalyzer - the JarClassesAnalysis.
Method Detail

getProject

public org.apache.maven.project.MavenProject getProject()
Getter for the project

Returns:
the project

hasDependencies

public boolean hasDependencies()
Returns:
true if getProjectDependencies() is not empty, false otherwise.

getProjectDependencies

public List getProjectDependencies()
Returns:
a list of Artifact from the project.

getTransitiveDependencies

public List getTransitiveDependencies()
Returns:
a list of transitive Artifact from the project.

getAllDependencies

public List getAllDependencies()
Returns:
a list of included Artifact returned by the dependency tree.

getDependenciesByScope

public Map getDependenciesByScope(boolean isTransitively)
Parameters:
isTransitively - true to return transitive dependencies, false otherwise.
Returns:
a map with supported scopes as key and a list of Artifact as values.
See Also:
Artifact.SCOPE_COMPILE, Artifact.SCOPE_PROVIDED, Artifact.SCOPE_RUNTIME, Artifact.SCOPE_SYSTEM, Artifact.SCOPE_TEST

getJarDependencyDetails

public org.apache.maven.shared.jar.JarData getJarDependencyDetails(org.apache.maven.artifact.Artifact artifact)
                                                            throws IOException
Parameters:
artifact - the artifact.
Returns:
the jardata object from the artifact
Throws:
IOException - if any


Copyright © 2005-2010 The Apache Software Foundation. All Rights Reserved.