Class DefaultDependableCoordinate
- java.lang.Object
-
- org.apache.maven.shared.transfer.dependencies.DefaultDependableCoordinate
-
- All Implemented Interfaces:
DependableCoordinate
public class DefaultDependableCoordinate extends java.lang.Object implements DependableCoordinate
Common usage of an DependableCoordinate for a Mojo@Parameter private DefaultDependableCoordinate[] dependencies;
andprivate DefaultDependableCoordinate dependable = new DefaultDependableCoordinate(); @Parameter( property = "groupId" ) private String groupId; @Parameter( property = "artifactId" ) private String artifactId; @Parameter( property = "version" ) private String version; @Parameter( property = "classifier" ) private String classifier; @Parameter( property = "type" ) private String type; public void setGroupId( String groupId ) { this.dependable.setGroupId( groupId ); } public void setArtifactId( String artifactId ) { this.dependable.setArtifactId( artifactId ); } public void setVersion( String version ) { this.dependable.setVersion( version ); } public void setClassifier( String classifier ) { this.dependable.setClassifier( classifier ); } public void setType( String type ) { this.dependable.setType( type ); }
Note: type is not the same as extension!ArtifactHandler
s are used to map a type to an extension.- Since:
- 3.0
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
artifactId
private java.lang.String
classifier
private java.lang.String
groupId
private java.lang.String
type
private java.lang.String
version
-
Constructor Summary
Constructors Constructor Description DefaultDependableCoordinate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getArtifactId()
java.lang.String
getClassifier()
java.lang.String
getGroupId()
java.lang.String
getType()
java.lang.String
getVersion()
A version or versionRangevoid
setArtifactId(java.lang.String artifactId)
void
setClassifier(java.lang.String classifier)
void
setGroupId(java.lang.String groupId)
void
setType(java.lang.String type)
void
setVersion(java.lang.String version)
java.lang.String
toString()
-
-
-
Method Detail
-
getGroupId
public final java.lang.String getGroupId()
- Specified by:
getGroupId
in interfaceDependableCoordinate
- Returns:
- the groupId of the coordinate
-
setGroupId
public final void setGroupId(java.lang.String groupId)
- Parameters:
groupId
- The groupId to be set.
-
getArtifactId
public final java.lang.String getArtifactId()
- Specified by:
getArtifactId
in interfaceDependableCoordinate
- Returns:
- the artifact of the coordinate
-
setArtifactId
public final void setArtifactId(java.lang.String artifactId)
- Parameters:
artifactId
- The artifactId to be set.
-
getVersion
public final java.lang.String getVersion()
Description copied from interface:DependableCoordinate
A version or versionRange- Specified by:
getVersion
in interfaceDependableCoordinate
- Returns:
- the version
-
setVersion
public final void setVersion(java.lang.String version)
- Parameters:
version
- The version to be set.
-
getType
public final java.lang.String getType()
- Specified by:
getType
in interfaceDependableCoordinate
- Returns:
- the type of the coordinate
-
setType
public void setType(java.lang.String type)
- Parameters:
type
- The type to be set.
-
getClassifier
public final java.lang.String getClassifier()
- Specified by:
getClassifier
in interfaceDependableCoordinate
- Returns:
- the classifier or
null
-
setClassifier
public final void setClassifier(java.lang.String classifier)
- Parameters:
classifier
- The classifier to be set.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- See Also:
DefaultArtifact.toString()
-
-