org.apache.maven.project
Class Dependency

java.lang.Object
  extended by org.apache.maven.project.Dependency
All Implemented Interfaces:
java.io.Serializable

public class Dependency
extends java.lang.Object
implements java.io.Serializable

null

Version:
$Revision$ $Date$
See Also:
Serialized Form

Field Summary
private  java.lang.String artifactId
          Field artifactId
private  java.lang.String groupId
          Field groupId
private  java.lang.String id
          Field id
private  java.lang.String jar
          Field jar
private  java.lang.String modelEncoding
           
private  java.util.Properties properties
          Field properties
private  java.lang.String type
          Field type
private  java.lang.String url
          Field url
private  java.lang.String version
          Field version
 
Constructor Summary
Dependency()
           
 
Method Summary
 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.lang.String getModelEncoding()
           
 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 setModelEncoding(java.lang.String modelEncoding)
           
 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()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

id

private java.lang.String id
Field id


groupId

private java.lang.String groupId
Field groupId


artifactId

private java.lang.String artifactId
Field artifactId


version

private java.lang.String version
Field version


url

private java.lang.String url
Field url


jar

private java.lang.String jar
Field jar


type

private java.lang.String type
Field type


properties

private java.util.Properties properties
Field properties


modelEncoding

private java.lang.String modelEncoding
Constructor Detail

Dependency

public Dependency()
Method Detail

addProperty

public void addProperty(java.lang.String key,
                        java.lang.String value)
Method addProperty

Parameters:
key -
value -

getArtifactId

public java.lang.String getArtifactId()
Get The unique id for an artifact produced by the project group, e.g. maven-artifact.


getGroupId

public java.lang.String getGroupId()
Get The project group that produced the dependency, e.g. org.apache.maven.


getId

public java.lang.String getId()
Get Deprecated. Please use groupId and artifactId together instead.


getJar

public java.lang.String getJar()
Get Literal name of the artifact in the repository. Used to override the calculated artifact name.


getProperties

public java.util.Properties getProperties()
Method getProperties


getType

public java.lang.String getType()
Get The type of dependency. This defaults to 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.


getUrl

public java.lang.String getUrl()
Get This url will be provided to the user if the jar file cannot be downloaded from the central repository.


getVersion

public java.lang.String getVersion()
Get The version of the dependency, e.g. 3.2.1. In Maven 2, this can also be specified as a range of versions.


setArtifactId

public void setArtifactId(java.lang.String artifactId)
Set The unique id for an artifact produced by the project group, e.g. maven-artifact.

Parameters:
artifactId -

setGroupId

public void setGroupId(java.lang.String groupId)
Set The project group that produced the dependency, e.g. org.apache.maven.

Parameters:
groupId -

setId

public void setId(java.lang.String id)
Set Deprecated. Please use groupId and artifactId together instead.

Parameters:
id -

setJar

public void setJar(java.lang.String jar)
Set Literal name of the artifact in the repository. Used to override the calculated artifact name.

Parameters:
jar -

setProperties

public void setProperties(java.util.Properties properties)
Set Properties about the dependency. Various plugins allow you to mark dependencies with properties. For example the war plugin looks for a war.bundle property, and if found will include the dependency in WEB-INF/lib.

Parameters:
properties -

setType

public void setType(java.lang.String type)
Set The type of dependency. This defaults to 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.

Parameters:
type -

setUrl

public 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.

Parameters:
url -

setVersion

public void setVersion(java.lang.String version)
Set The version of the dependency, e.g. 3.2.1. In Maven 2, this can also be specified as a range of versions.

Parameters:
version -

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getKey

public java.lang.String getKey()

getArtifactDirectory

public java.lang.String getArtifactDirectory()

getArtifact

public java.lang.String getArtifact()

getTypeDirectory

public java.lang.String getTypeDirectory()

getExtension

public java.lang.String getExtension()

isAddedToClasspath

public boolean isAddedToClasspath()

isPlugin

public boolean isPlugin()

getProperty

public java.lang.String getProperty(java.lang.String property)

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

setModelEncoding

public void setModelEncoding(java.lang.String modelEncoding)

getModelEncoding

public java.lang.String getModelEncoding()