Package org.apache.maven.model
Class Dependency
java.lang.Object
org.apache.maven.model.BaseObject
org.apache.maven.model.Dependency
- All Implemented Interfaces:
Serializable
,Cloneable
,InputLocationTracker
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.maven.model.BaseObject
BaseObject.ChildrenTracking
-
Field Summary
Fields inherited from class org.apache.maven.model.BaseObject
childrenTracking, delegate
-
Constructor Summary
ConstructorDescriptionDependency
(Dependency delegate) Dependency
(Dependency delegate, BaseObject parent) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addExclusion
(Exclusion exclusion) clone()
static List<Dependency>
dependencyToApiV3
(List<Dependency> list) static List<Dependency>
dependencyToApiV4
(List<Dependency> list) getLocation
(Object key) Gets the location of the specified field in the input source.getScope()
getType()
boolean
void
removeExclusion
(Exclusion exclusion) protected boolean
void
setArtifactId
(String artifactId) void
setClassifier
(String classifier) void
setExclusions
(List<Exclusion> exclusions) void
setGroupId
(String groupId) void
setLocation
(Object key, InputLocation location) Sets the location of the specified field.void
setOptional
(boolean optional) void
setOptional
(String optional) void
void
setSystemPath
(String systemPath) void
void
setVersion
(String version) toString()
Methods inherited from class org.apache.maven.model.BaseObject
update
-
Constructor Details
-
Dependency
public Dependency() -
Dependency
-
Dependency
-
-
Method Details
-
clone
-
getDelegate
- Overrides:
getDelegate
in classBaseObject
-
getGroupId
-
setGroupId
-
getArtifactId
-
setArtifactId
-
getVersion
-
setVersion
-
getType
-
setType
-
getClassifier
-
setClassifier
-
getScope
-
setScope
-
getSystemPath
-
setSystemPath
-
getExclusions
-
setExclusions
-
addExclusion
-
removeExclusion
-
getOptional
-
setOptional
-
getLocation
Description copied from interface:InputLocationTracker
Gets the location of the specified field in the input source.- Parameters:
key
- The key of the field, must not benull
.- Returns:
- The location of the field in the input source or
null
if unknown.
-
setLocation
Description copied from interface:InputLocationTracker
Sets the location of the specified field.- Parameters:
key
- The key of the field, must not benull
.location
- The location of the field, may benull
.
-
replace
- Overrides:
replace
in classBaseObject
-
dependencyToApiV4
-
dependencyToApiV3
-
isOptional
public boolean isOptional() -
setOptional
public void setOptional(boolean optional) -
toString
-
getManagementKey
- Returns:
- the management key as
groupId:artifactId:type
-