public class Dependency
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
artifactId
The unique id for an artifact produced by the
project group, e.g.
|
private java.lang.String |
groupId
The project group that produced the dependency,
e.g.
|
private java.lang.String |
id
Deprecated.
|
private java.lang.String |
jar
Literal name of the artifact in the repository.
|
private java.util.Properties |
properties
Field properties.
|
private java.lang.String |
type
The type of dependency.
|
private java.lang.String |
url
This url will be provided to the user if the jar
file cannot be downloaded
from the central repository.
|
private java.lang.String |
version
The version of the dependency, e.g.
|
Constructor and Description |
---|
Dependency() |
Modifier and Type | Method and Description |
---|---|
void |
addProperty(java.lang.String key,
java.lang.String value)
Method addProperty.
|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getArtifact() |
java.lang.String |
getArtifactDirectory() |
java.lang.String |
getArtifactId()
Get the unique id for an artifact produced by the project
group, e.g.
|
java.lang.String |
getExtension() |
java.lang.String |
getGroupId()
Get the project group that produced the dependency, e.g.
|
java.lang.String |
getId()
Get Deprecated.
|
java.lang.String |
getJar()
Get literal name of the artifact in the repository.
|
java.lang.String |
getKey() |
java.util.Properties |
getProperties()
Method getProperties.
|
java.lang.String |
getProperty(java.lang.String property) |
java.lang.String |
getType()
Get the type of dependency.
|
java.lang.String |
getTypeDirectory() |
java.lang.String |
getUrl()
Get this url will be provided to the user if the jar file
cannot be downloaded
from the central repository.
|
java.lang.String |
getVersion()
Get the version of the dependency, e.g.
|
int |
hashCode() |
boolean |
isAddedToClasspath() |
boolean |
isPlugin() |
void |
setArtifactId(java.lang.String artifactId)
Set the unique id for an artifact produced by the project
group, e.g.
|
void |
setGroupId(java.lang.String groupId)
Set the project group that produced the dependency, e.g.
|
void |
setId(java.lang.String id)
Set Deprecated.
|
void |
setJar(java.lang.String jar)
Set literal name of the artifact in the repository.
|
void |
setProperties(java.util.Properties properties)
Set properties about the dependency.
|
void |
setType(java.lang.String type)
Set the type of dependency.
|
void |
setUrl(java.lang.String url)
Set this url will be provided to the user if the jar file
cannot be downloaded
from the central repository.
|
void |
setVersion(java.lang.String version)
Set the version of the dependency, e.g.
|
java.lang.String |
toString() |
private java.lang.String id
groupId
and
artifactId
together instead.private java.lang.String groupId
org.apache.maven
.private java.lang.String artifactId
maven-artifact
.private java.lang.String version
3.2.1
. In Maven 2, this can also be
specified as a range of versions.private java.lang.String url
private java.lang.String jar
private java.lang.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.private java.util.Properties properties
public void addProperty(java.lang.String key, java.lang.String value)
key
- value
- public java.lang.String getArtifactId()
maven-artifact
.public java.lang.String getGroupId()
org.apache.maven
.public java.lang.String getId()
groupId
and
artifactId
together instead.public java.lang.String getJar()
public java.util.Properties getProperties()
public java.lang.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 java.lang.String getUrl()
public java.lang.String getVersion()
3.2.1
.
In Maven 2, this can also be
specified as a range of versions.public void setArtifactId(java.lang.String artifactId)
maven-artifact
.artifactId
- public void setGroupId(java.lang.String groupId)
org.apache.maven
.groupId
- public void setId(java.lang.String id)
groupId
and
artifactId
together instead.id
- public void setJar(java.lang.String jar)
jar
- public void setProperties(java.util.Properties properties)
war.bundle
property, and if found
will include the
dependency in WEB-INF/lib
.properties
- public void setType(java.lang.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(java.lang.String url)
url
- public void setVersion(java.lang.String version)
3.2.1
.
In Maven 2, this can also be
specified as a range of versions.version
- public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getKey()
public java.lang.String getArtifactDirectory()
public java.lang.String getArtifact()
public java.lang.String getTypeDirectory()
public java.lang.String getExtension()
public boolean isAddedToClasspath()
public boolean isPlugin()
public java.lang.String getProperty(java.lang.String property)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object