public final class Artifact extends Object
| 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 |
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 |
stripSnapshotOrRcQualifier(String version)
Strip the SNAPSHOT or RC qualifier from a given version.
|
String |
toString() |
public Artifact()
Artifact instance.public static String stripSnapshotOrRcQualifier(String version)
version - 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 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 © 2017–2020 Oracle Corporation. All rights reserved.