|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.maven.model.Dependency
public class Dependency
The <dependency>
element contains
information about a dependency
of the project.
Constructor Summary | |
---|---|
Dependency()
|
Method Summary | |
---|---|
void |
addExclusion(Exclusion exclusion)
Method addExclusion. |
String |
getArtifactId()
Get the unique id for an artifact produced by the project group, e.g. |
String |
getClassifier()
Get the classifier of the dependency. |
List<Exclusion> |
getExclusions()
Method getExclusions. |
String |
getGroupId()
Get the project group that produced the dependency, e.g. |
String |
getManagementKey()
|
String |
getScope()
Get the scope of the dependency - compile ,
runtime ,
test , system , and
provided . |
String |
getSystemPath()
Get fOR SYSTEM SCOPE ONLY. |
String |
getType()
Get the type of dependency. |
String |
getVersion()
Get the version of the dependency, e.g. |
boolean |
isOptional()
Get indicates the dependency is optional for use of this library. |
void |
removeExclusion(Exclusion exclusion)
Method removeExclusion. |
void |
setArtifactId(String artifactId)
Set the unique id for an artifact produced by the project group, e.g. |
void |
setClassifier(String classifier)
Set the classifier of the dependency. |
void |
setExclusions(List<Exclusion> exclusions)
Set lists a set of artifacts that should be excluded from this dependency's artifact list when it comes to calculating transitive dependencies. |
void |
setGroupId(String groupId)
Set the project group that produced the dependency, e.g. |
void |
setOptional(boolean optional)
Set indicates the dependency is optional for use of this library. |
void |
setScope(String scope)
Set the scope of the dependency - compile ,
runtime ,
test , system , and
provided . |
void |
setSystemPath(String systemPath)
Set fOR SYSTEM SCOPE ONLY. |
void |
setType(String type)
Set the type of dependency. |
void |
setVersion(String version)
Set the version of the dependency, e.g. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Dependency()
Method Detail |
---|
public void addExclusion(Exclusion exclusion)
exclusion
- public String getArtifactId()
maven-artifact
.
public String getClassifier()
jdk14
and jdk15
.
public List<Exclusion> getExclusions()
public String getGroupId()
org.apache.maven
.
public String getScope()
compile
,
runtime
,
test
, system
, and
provided
. Used to
calculate the various classpaths used for
compilation, testing, and so on.
It also assists in determining which artifacts
to include in a distribution of
this project. For more information, see
the
dependency mechanism.
public String getSystemPath()
${java.home}
.
public String getType()
jar
. While it
usually represents the extension on the filename
of the dependency,
that is not always the case. A type can be
mapped to a different
extension and a classifier.
The type often correspongs to the packaging
used, though this is also
not always the case.
Some examples are jar
,
war
, ejb-client
and test-jar
.
New types can be defined by plugins that set
extensions
to true
, so
this is not a complete list.
public String getVersion()
3.2.1
.
In Maven 2, this can also be
specified as a range of versions.
public boolean isOptional()
public void removeExclusion(Exclusion exclusion)
exclusion
- public void setArtifactId(String artifactId)
maven-artifact
.
artifactId
- public void setClassifier(String classifier)
jdk14
and jdk15
.
classifier
- public void setExclusions(List<Exclusion> exclusions)
exclusions
- public void setGroupId(String groupId)
org.apache.maven
.
groupId
- public void setOptional(boolean optional)
optional
- public void setScope(String scope)
compile
,
runtime
,
test
, system
, and
provided
. Used to
calculate the various classpaths used for
compilation, testing, and so on.
It also assists in determining which artifacts
to include in a distribution of
this project. For more information, see
the
dependency mechanism.
scope
- public void setSystemPath(String systemPath)
${java.home}
.
systemPath
- public void setType(String type)
jar
. While it
usually represents the extension on the filename
of the dependency,
that is not always the case. A type can be
mapped to a different
extension and a classifier.
The type often correspongs to the packaging
used, though this is also
not always the case.
Some examples are jar
,
war
, ejb-client
and test-jar
.
New types can be defined by plugins that set
extensions
to true
, so
this is not a complete list.
type
- public void setVersion(String version)
3.2.1
.
In Maven 2, this can also be
specified as a range of versions.
version
- public String toString()
toString
in class Object
Object.toString()
public String getManagementKey()
groupId:artifactId:type
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |