public class Dependencies
extends java.lang.Object
| Constructor | Description |
|---|---|
Dependencies(MavenProject project,
DependencyNode dependencyTreeNode,
JarClassesAnalysis classesAnalyzer) |
Default constructor
|
| Modifier and Type | Method | Description |
|---|---|---|
java.util.List<Artifact> |
getAllDependencies() |
|
java.util.Map<java.lang.String,java.util.List<Artifact>> |
getDependenciesByScope(boolean isTransitively) |
|
java.io.File |
getFile(Artifact artifact) |
get the artifact's file, with detection of target/classes directory with already packaged jar available.
|
JarData |
getJarDependencyDetails(Artifact artifact) |
|
MavenProject |
getProject() |
Getter for the project
|
java.util.List<Artifact> |
getProjectDependencies() |
|
java.util.List<Artifact> |
getTransitiveDependencies() |
|
boolean |
hasDependencies() |
public Dependencies(MavenProject project, DependencyNode dependencyTreeNode, JarClassesAnalysis classesAnalyzer)
project - the MavenProject.dependencyTreeNode - the DependencyNode.classesAnalyzer - the JarClassesAnalysis.public MavenProject getProject()
public boolean hasDependencies()
true if getProjectDependencies() is not empty, false otherwise.public java.util.List<Artifact> getProjectDependencies()
Artifact from the project.public java.util.List<Artifact> getTransitiveDependencies()
Artifact from the project.public java.util.List<Artifact> getAllDependencies()
Artifact returned by the dependency tree.public java.util.Map<java.lang.String,java.util.List<Artifact>> getDependenciesByScope(boolean isTransitively)
isTransitively - true to return transitive dependencies, false otherwise.Artifact as values.Artifact.SCOPE_COMPILE,
Artifact.SCOPE_PROVIDED,
Artifact.SCOPE_RUNTIME,
Artifact.SCOPE_SYSTEM,
Artifact.SCOPE_TESTpublic JarData getJarDependencyDetails(Artifact artifact) throws java.io.IOException
artifact - the artifact.java.io.IOException - if anypublic java.io.File getFile(Artifact artifact)
artifact - the artifact to retrieve the physical fileCopyright © 2005–2018 The Apache Software Foundation. All rights reserved.