public class Dependency
extends org.apache.maven.model.Dependency
| Constructor and Description |
|---|
Dependency()
Creates a new
Dependency. |
Dependency(String groupId,
String artifactId,
String version)
Creates a new
Dependency. |
Dependency(String groupId,
String artifactId,
String version,
String type)
Creates a new
Dependency. |
| Modifier and Type | Method and Description |
|---|---|
String |
getGACV() |
ResolutionOptions |
getResolutionOptions()
Creates the
ResolutionOptions object for the dependency. |
boolean |
isIncluded() |
boolean |
isTransitive() |
Dependency |
setIncluded(boolean included)
Sets whether or not the dependency is included.
|
void |
setOptional(boolean optional)
Not supported property, as the concept of 'optional' does not make sense when building a stack.
|
Dependency |
setTransitive(boolean transitive)
Sets whether or not the dependency resolution also resolves the transitive dependencies.
|
addExclusion, clone, getArtifactId, getClassifier, getExclusions, getGroupId, getLocation, getManagementKey, getOptional, getScope, getSystemPath, getType, getVersion, isOptional, removeExclusion, setArtifactId, setClassifier, setExclusions, setGroupId, setLocation, setOptional, setScope, setSystemPath, setType, setVersion, toStringpublic Dependency(String groupId, String artifactId, String version)
Dependency.groupId - the groupIdartifactId - the artifactIdversion - the versionpublic Dependency(String groupId, String artifactId, String version, String type)
Dependency.groupId - the groupIdartifactId - the artifactIdversion - the versiontype - the type / extension / packagingpublic Dependency()
Dependency.
The type is set to "jar" by default.public boolean isIncluded()
true if the dependency is included, false otherwise.public Dependency setIncluded(boolean included)
included - true/falseDependency instance.public boolean isTransitive()
true if the dependency must be resolved with its transitive dependencies.public Dependency setTransitive(boolean transitive)
transitive - true/falseDependency instance.public ResolutionOptions getResolutionOptions()
ResolutionOptions object for the dependency.ResolutionOptions instructing the dependency resolution.public String getGACV()
public void setOptional(boolean optional)
setOptional in class org.apache.maven.model.Dependencyoptional - ignoredCopyright © 2016–2019. All rights reserved.