| Constructor and Description |
|---|
StubArtifact(String coords) |
StubArtifact(String coords,
Map<String,String> properties) |
StubArtifact(String groupId,
String artifactId,
String classifier,
String extension,
String version) |
StubArtifact(String groupId,
String artifactId,
String classifier,
String extension,
String version,
Map<String,String> properties) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getArtifactId()
Gets the artifact identifier of this artifact, for example "maven-model".
|
String |
getBaseVersion()
Gets the base version of this artifact, for example "1.0-SNAPSHOT".
|
String |
getClassifier()
Gets the classifier of this artifact, for example "sources".
|
String |
getExtension()
Gets the (file) extension of this artifact, for example "jar".
|
File |
getFile()
Gets the file of this artifact.
|
String |
getGroupId()
Gets the group identifier of this artifact, for example "org.apache.maven".
|
Map<String,String> |
getProperties()
Gets the properties of this artifact.
|
String |
getProperty(String key,
String defaultValue)
Gets the specified property.
|
String |
getVersion()
Gets the version of this artifact, for example "1.0-20100529-1213".
|
int |
hashCode() |
protected StubArtifact |
internalSetFile(File file) |
boolean |
isSnapshot()
Determines whether this artifact uses a snapshot version.
|
StubArtifact |
setFile(File file)
Sets the file of the artifact.
|
Artifact |
setProperties(Map<String,String> properties)
Sets the properties for the artifact.
|
Artifact |
setVersion(String version)
Sets the version of this artifact.
|
String |
toString() |
public StubArtifact(String coords)
public StubArtifact(String groupId, String artifactId, String classifier, String extension, String version, Map<String,String> properties)
public String getGroupId()
ArtifactgetGroupId in interface Artifactnull.public String getArtifactId()
ArtifactgetArtifactId in interface Artifactnull.public String getVersion()
ArtifactgetVersion in interface Artifactnull.public Artifact setVersion(String version)
ArtifactsetVersion in interface Artifactversion - The version of this artifact, may be null or empty.null.public String getBaseVersion()
ArtifactArtifact.getVersion(), the
base version will always refer to the unresolved meta version.getBaseVersion in interface Artifactnull.public boolean isSnapshot()
ArtifactisSnapshot in interface Artifacttrue if the artifact is a snapshot, false otherwise.public String getClassifier()
ArtifactgetClassifier in interface Artifactnull.public String getExtension()
ArtifactgetExtension in interface Artifactnull.public File getFile()
Artifactpublic StubArtifact setFile(File file)
Artifactprotected StubArtifact internalSetFile(File file)
public String getProperty(String key, String defaultValue)
ArtifactgetProperty in interface Artifactkey - The name of the property, must not be null.defaultValue - The default value to return in case the property is not set, may be null.public Map<String,String> getProperties()
ArtifactgetProperties in interface Artifactnull.public Artifact setProperties(Map<String,String> properties)
ArtifactsetProperties in interface Artifactproperties - The properties for the artifact, may be null.null.Copyright © 2010-2014 Sonatype, Inc.. All Rights Reserved.