public class Dependency extends Object implements Serializable
<dependency> element contains
information about a dependency
of the project.| Constructor and Description |
|---|
Dependency() |
| Modifier and Type | Method and Description |
|---|---|
void |
addProperty(String key,
String value)
Method addProperty.
|
boolean |
equals(Object o) |
String |
getArtifact() |
String |
getArtifactDirectory() |
String |
getArtifactId()
Get the unique id for an artifact produced by the project
group, e.g.
|
String |
getExtension() |
String |
getGroupId()
Get the project group that produced the dependency, e.g.
|
String |
getId()
Get Deprecated.
|
String |
getJar()
Get literal name of the artifact in the repository.
|
String |
getKey() |
Properties |
getProperties()
Method getProperties.
|
String |
getProperty(String property) |
String |
getType()
Get the type of dependency.
|
String |
getTypeDirectory() |
String |
getUrl()
Get this url will be provided to the user if the jar file
cannot be downloaded
from the central repository.
|
String |
getVersion()
Get the version of the dependency, e.g.
|
int |
hashCode() |
boolean |
isAddedToClasspath() |
boolean |
isPlugin() |
void |
setArtifactId(String artifactId)
Set the unique id for an artifact produced by the project
group, e.g.
|
void |
setGroupId(String groupId)
Set the project group that produced the dependency, e.g.
|
void |
setId(String id)
Set Deprecated.
|
void |
setJar(String jar)
Set literal name of the artifact in the repository.
|
void |
setProperties(Properties properties)
Set properties about the dependency.
|
void |
setType(String type)
Set the type of dependency.
|
void |
setUrl(String url)
Set this url will be provided to the user if the jar file
cannot be downloaded
from the central repository.
|
void |
setVersion(String version)
Set the version of the dependency, e.g.
|
String |
toString() |
public void addProperty(String key, String value)
key - value - public String getArtifactId()
maven-artifact.public String getGroupId()
org.apache.maven.public String getId()
groupId and
artifactId together instead.public String getJar()
public Properties getProperties()
public String getType()
jar. While it
usually represents the extension on the filename
of the dependency,
that is not always the case.
Some examples are jar,
war, and plugin.
A dependency of type plugin is
loaded as a Maven plugin and
not added to the project build classpath.public String getUrl()
public String getVersion()
3.2.1.
In Maven 2, this can also be
specified as a range of versions.public void setArtifactId(String artifactId)
maven-artifact.artifactId - public void setGroupId(String groupId)
org.apache.maven.groupId - public void setId(String id)
groupId and
artifactId together instead.id - public void setJar(String jar)
jar - public void setProperties(Properties properties)
war.bundle property, and if found
will include the
dependency in WEB-INF/lib.properties - public void setType(String type)
jar. While it
usually represents the extension on the filename
of the dependency,
that is not always the case.
Some examples are jar,
war, and plugin.
A dependency of type plugin is
loaded as a Maven plugin and
not added to the project build classpath.type - public void setUrl(String url)
url - 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 ObjectObject.toString()public String getKey()
id:typepublic String getArtifactDirectory()
public String getArtifact()
artifactId-version.extension if <jar/> not setpublic String getTypeDirectory()
public String getExtension()
public boolean isAddedToClasspath()
public boolean isPlugin()
public boolean equals(Object o)
equals in class ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class ObjectObject.hashCode()Copyright © 2001-2021 The Apache Software Foundation. All Rights Reserved.