public class DefaultArtifactCoordinate extends Object implements ArtifactCoordinate
@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.Constructor and Description |
---|
DefaultArtifactCoordinate() |
Modifier and Type | Method and Description |
---|---|
String |
getArtifactId() |
String |
getClassifier() |
String |
getExtension()
The file-extension of the artifact.
|
String |
getGroupId() |
String |
getVersion()
A version, never a versionRange
|
void |
setArtifactId(String artifactId) |
void |
setClassifier(String classifier) |
void |
setExtension(String extension) |
void |
setGroupId(String groupId) |
void |
setVersion(String version) |
String |
toString() |
public final String getGroupId()
getGroupId
in interface ArtifactCoordinate
public final void setGroupId(String groupId)
groupId
- The groupId to be used.public final String getArtifactId()
getArtifactId
in interface ArtifactCoordinate
public final void setArtifactId(String artifactId)
artifactId
- The artifactId to be used.public final String getVersion()
ArtifactCoordinate
getVersion
in interface ArtifactCoordinate
public final void setVersion(String version)
version
- The version to be used.public final String getExtension()
ArtifactCoordinate
getExtension
in interface ArtifactCoordinate
public final void setExtension(String extension)
extension
- The extension to be used.public final String getClassifier()
getClassifier
in interface ArtifactCoordinate
public final void setClassifier(String classifier)
classifier
- The classifier to be used.public String toString()
toString
in class Object
DefaultArtifact.toString()
Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.