public final class Artifact extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
SNAPSHOT_QUALIFIER
The Maven SNAPSHOT qualifier.
|
| Constructor and Description |
|---|
Artifact()
Create a new
Artifact instance. |
Artifact(String gId,
String aId,
String v)
Create a new
Artifact instance. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static Artifact |
fromJar(JarFile jar)
Create an
Artifact instance from a given JAR file. |
String |
getAbsoluteVersion()
Get the normalized release version for this artifact.
|
String |
getArtifactId()
Get the artifactId for this artifact.
|
String |
getBuildNumber()
Get the build number of this artifact.
|
String |
getGroupId()
Get the groupId for this artifact.
|
org.apache.maven.artifact.versioning.ArtifactVersion |
getVersion()
Get the version for this artifact.
|
int |
hashCode() |
void |
setArtifactId(String aId)
Set the artifactId of this artifact.
|
void |
setGroupId(String gId)
Set the groupId of this artifact.
|
void |
setVersion(String v)
Set the version of this artifact.
|
static String |
stripSnapshotQualifier(String qualifier)
Strip the SNAPSHOT qualifier from a given qualifier.
|
String |
toString() |
public static final String SNAPSHOT_QUALIFIER
public Artifact()
Artifact instance.public static String stripSnapshotQualifier(String qualifier)
qualifier - the qualifier to processpublic String getArtifactId()
public String getGroupId()
public org.apache.maven.artifact.versioning.ArtifactVersion getVersion()
public String getAbsoluteVersion()
public void setArtifactId(String aId)
aId - the artifactId value to usepublic void setGroupId(String gId)
gId - the artifactId value to usepublic void setVersion(String v)
v - the artifactId value to usepublic String getBuildNumber()
public static Artifact fromJar(JarFile jar) throws IOException
Artifact instance from a given JAR file.jar - the jar file to processArtifact instanceIOException - if an error occurs while reading JAR file entriesCopyright © 2018 Oracle Corporation. All Rights Reserved.