Class Dependencies
java.lang.Object
org.apache.maven.report.projectinfo.dependencies.Dependencies
- Since:
- 2.1
-
Constructor Summary
ConstructorsConstructorDescriptionDependencies(org.apache.maven.project.MavenProject project, org.apache.maven.shared.dependency.graph.DependencyNode dependencyTreeNode, org.apache.maven.shared.jar.classes.JarClassesAnalysis classesAnalyzer) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionList<org.apache.maven.artifact.Artifact> getDependenciesByScope(boolean isTransitively) getFile(org.apache.maven.artifact.Artifact artifact) get the artifact's file, with detection of target/classes directory with already packaged jar available.org.apache.maven.shared.jar.JarDatagetJarDependencyDetails(org.apache.maven.artifact.Artifact artifact) org.apache.maven.project.MavenProjectGetter for the projectList<org.apache.maven.artifact.Artifact> List<org.apache.maven.artifact.Artifact> boolean
-
Constructor Details
-
Method Details
-
getProject
public org.apache.maven.project.MavenProject getProject()Getter for the project- Returns:
- the project
-
hasDependencies
public boolean hasDependencies()- Returns:
trueif getProjectDependencies() is not empty,falseotherwise.
-
getProjectDependencies
- Returns:
- a list of
Artifactfrom the project.
-
getTransitiveDependencies
- Returns:
- a list of transitive
Artifactfrom the project.
-
getAllDependencies
- Returns:
- a list of included
Artifactreturned by the dependency tree.
-
getDependenciesByScope
public Map<String,List<org.apache.maven.artifact.Artifact>> getDependenciesByScope(boolean isTransitively) - Parameters:
isTransitively-trueto return transitive dependencies,falseotherwise.- Returns:
- a map with supported scopes as key and a list of
Artifactas values. - See Also:
-
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
-
getFile
get the artifact's file, with detection of target/classes directory with already packaged jar available.- Parameters:
artifact- the artifact to retrieve the physical file- Returns:
- the physical file representing the given artifact
-