public interface Artifact
Artifact objects are immutable – all methods which modify artifact return a new object and keep the original unmodified.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_EXTENSION
Default artifact extension, used if no explicit extension is specified.
|
static java.lang.String |
DEFAULT_VERSION
Default artifact version, used if no explicit version is specified.
|
static java.lang.String |
MF_KEY_ARTIFACTID |
static java.lang.String |
MF_KEY_CLASSIFIER |
static java.lang.String |
MF_KEY_EXTENSION |
static java.lang.String |
MF_KEY_GROUPID |
static java.lang.String |
MF_KEY_VERSION |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getArtifactId()
Get artifact identifier of this artifact.
|
java.lang.String |
getClassifier()
Get classifier of this artifact.
|
java.lang.String |
getExtension()
Get extension of this artifact.
|
java.lang.String |
getGroupId()
Get group identifier of this artifact.
|
java.nio.file.Path |
getPath()
Get local path of artifact file or
null if artifact is not resolved (doesn't have associated artifact
file). |
java.lang.String |
getVersion()
Get version of this artifact.
|
Artifact |
setPath(java.nio.file.Path path)
Set artifact path.
|
Artifact |
setVersion(java.lang.String version)
Set artifact version.
|
static final java.lang.String DEFAULT_EXTENSION
static final java.lang.String DEFAULT_VERSION
static final java.lang.String MF_KEY_GROUPID
static final java.lang.String MF_KEY_ARTIFACTID
static final java.lang.String MF_KEY_EXTENSION
static final java.lang.String MF_KEY_CLASSIFIER
static final java.lang.String MF_KEY_VERSION
java.lang.String getGroupId()
null
.java.lang.String getArtifactId()
null
.java.lang.String getExtension()
null
.java.lang.String getClassifier()
null
.java.lang.String getVersion()
null
.java.nio.file.Path getPath()
null
if artifact is not resolved (doesn't have associated artifact
file).null
.Artifact setVersion(java.lang.String version)
Since artifacts are immutable, this method returns a new object and leaves the original unmodified.
version
- the new artifact version to setArtifact setPath(java.nio.file.Path path)
Since artifacts are immutable, this method returns a new object and leaves the original unmodified.
path
- the new artifact path to setCopyright © 2012–2017 Red Hat, Inc.. All rights reserved.