Class DefaultDependableCoordinate
java.lang.Object
org.apache.maven.shared.transfer.dependencies.DefaultDependableCoordinate
- All Implemented Interfaces:
DependableCoordinate
Common usage of an DependableCoordinate for a Mojo
@Parameter private DefaultDependableCoordinate[] dependencies;and
private 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
- Author:
- Robert Scholte
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal String
final String
final String
final String
getType()
final String
A version or versionRangefinal void
setArtifactId
(String artifactId) final void
setClassifier
(String classifier) final void
setGroupId
(String groupId) void
final void
setVersion
(String version) toString()
-
Constructor Details
-
DefaultDependableCoordinate
public DefaultDependableCoordinate()
-
-
Method Details
-
getGroupId
- Specified by:
getGroupId
in interfaceDependableCoordinate
- Returns:
- the groupId of the coordinate
-
setGroupId
- Parameters:
groupId
- The groupId to be set.
-
getArtifactId
- Specified by:
getArtifactId
in interfaceDependableCoordinate
- Returns:
- the artifact of the coordinate
-
setArtifactId
- Parameters:
artifactId
- The artifactId to be set.
-
getVersion
Description copied from interface:DependableCoordinate
A version or versionRange- Specified by:
getVersion
in interfaceDependableCoordinate
- Returns:
- the version
-
setVersion
- Parameters:
version
- The version to be set.
-
getType
- Specified by:
getType
in interfaceDependableCoordinate
- Returns:
- the type of the coordinate
-
setType
- Parameters:
type
- The type to be set.
-
getClassifier
- Specified by:
getClassifier
in interfaceDependableCoordinate
- Returns:
- the classifier or
null
-
setClassifier
- Parameters:
classifier
- The classifier to be set.
-
toString
-