public interface Artifact
AbstractArtifact
instead of directly implementing this interface.Modifier and Type | Method and Description |
---|---|
java.lang.String |
getArtifactId()
Gets the artifact identifier of this artifact, for example "maven-model".
|
java.lang.String |
getBaseVersion()
Gets the base version of this artifact, for example "1.0-SNAPSHOT".
|
java.lang.String |
getClassifier()
Gets the classifier of this artifact, for example "sources".
|
java.lang.String |
getExtension()
Gets the (file) extension of this artifact, for example "jar" or "tar.gz".
|
java.io.File |
getFile()
Gets the file of this artifact.
|
java.lang.String |
getGroupId()
Gets the group identifier of this artifact, for example "org.apache.maven".
|
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
Gets the properties of this artifact.
|
java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue)
Gets the specified property.
|
java.lang.String |
getVersion()
Gets the version of this artifact, for example "1.0-20100529-1213".
|
boolean |
isSnapshot()
Determines whether this artifact uses a snapshot version.
|
Artifact |
setFile(java.io.File file)
Sets the file of the artifact.
|
Artifact |
setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Sets the properties for the artifact.
|
Artifact |
setVersion(java.lang.String version)
Sets the version of the artifact.
|
java.lang.String getGroupId()
null
.java.lang.String getArtifactId()
null
.java.lang.String getVersion()
null
.Artifact setVersion(java.lang.String version)
version
- The version of this artifact, may be null
or empty.null
.java.lang.String getBaseVersion()
getVersion()
, the
base version will always refer to the unresolved meta version.null
.boolean isSnapshot()
true
if the artifact is a snapshot, false
otherwise.java.lang.String getClassifier()
null
.java.lang.String getExtension()
null
.java.io.File getFile()
null
if the artifact isn't resolved.Artifact setFile(java.io.File file)
file
- The file of the artifact, may be null
null
.java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
key
- 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
.null
if the property is not set and no default value was
provided.ArtifactProperties
java.util.Map<java.lang.String,java.lang.String> getProperties()
null
.ArtifactProperties
Artifact setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
properties
- The properties for the artifact, may be null
.null
.ArtifactProperties