Class DefaultArtifactCoordinate
java.lang.Object
org.apache.maven.shared.transfer.artifact.DefaultArtifactCoordinate
- All Implemented Interfaces:
ArtifactCoordinate
Common usage of an ArtifactCoordinate for a Mojo
@Parameter private DefaultArtifactCoordinate[] artifacts;and
private DefaultArtifactCoordinate artifact = new DefaultArtifactCoordinate(); @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.artifact.setGroupId( groupId ); } public void setArtifactId( String artifactId ) { this.artifact.setArtifactId( artifactId ); } public void setVersion( String version ) { this.artifact.setVersion( version ); } public void setClassifier( String classifier ) { this.artifact.setClassifier( classifier ); } public void setType( String type ) { this.artifact.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
The file-extension of the artifact.final String
final String
A version, never a versionRangefinal void
setArtifactId
(String artifactId) final void
setClassifier
(String classifier) final void
setExtension
(String extension) final void
setGroupId
(String groupId) final void
setVersion
(String version) toString()
-
Constructor Details
-
DefaultArtifactCoordinate
public DefaultArtifactCoordinate()
-
-
Method Details
-
getGroupId
- Specified by:
getGroupId
in interfaceArtifactCoordinate
- Returns:
- The groupId of the artifact.
-
setGroupId
- Parameters:
groupId
- The groupId to be used.
-
getArtifactId
- Specified by:
getArtifactId
in interfaceArtifactCoordinate
- Returns:
- The artifactId of the artifact.
-
setArtifactId
- Parameters:
artifactId
- The artifactId to be used.
-
getVersion
Description copied from interface:ArtifactCoordinate
A version, never a versionRange- Specified by:
getVersion
in interfaceArtifactCoordinate
- Returns:
- The version.
-
setVersion
- Parameters:
version
- The version to be used.
-
getExtension
Description copied from interface:ArtifactCoordinate
The file-extension of the artifact.- Specified by:
getExtension
in interfaceArtifactCoordinate
- Returns:
- The extension.
-
setExtension
- Parameters:
extension
- The extension to be used.
-
getClassifier
- Specified by:
getClassifier
in interfaceArtifactCoordinate
- Returns:
- The classifier of the artifact.
-
setClassifier
- Parameters:
classifier
- The classifier to be used.
-
toString
-