|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.codehaus.mojo.mrm.api.maven.Artifact
public final class Artifact
Represents a specific artifact in a Maven repository. Implements Comparable to sort based on
getGroupId() and then getName().
| Constructor Summary | |
|---|---|
Artifact(String groupId,
String artifactId,
String version,
String type)
An artifact. |
|
Artifact(String groupId,
String artifactId,
String version,
String type,
long timestamp,
int buildNumber)
A timestamped snapshot artifact. |
|
Artifact(String groupId,
String artifactId,
String version,
String classifier,
String type)
A classified snapshot artifact. |
|
Artifact(String groupId,
String artifactId,
String version,
String classifier,
String type,
long timestamp,
int buildNumber)
A timestamped classified snapshot artifact. |
|
| Method Summary | |
|---|---|
int |
compareTo(Object o)
|
boolean |
equals(Object o)
|
boolean |
equalSnapshots(Artifact artifact)
More lax version of equals(Object) that matches SNAPSHOTs with their corresponding timestamped versions. |
String |
getArtifactId()
Returns the artifactId of the artifact. |
Integer |
getBuildNumber()
Returns the build number of the artifact (may be null). |
String |
getClassifier()
Returns the classifier of the artifact (may be null). |
String |
getGroupId()
Returns the groupId of the artifact. |
String |
getName()
Returns the name of the artifact. |
Long |
getTimestamp()
Returns the timestamp of the artifact (may be null). |
String |
getTimestampString()
Returns the timestamp (formatted as a yyyyMMdd.HHmmss string) of the artifact
(may be null). |
String |
getTimestampVersion()
Returns the timestamp version. |
String |
getType()
Returns the type of the artifact. |
String |
getVersion()
Returns the version of the artifact. |
int |
hashCode()
|
boolean |
isSnapshot()
Returns true if and only if the artifact is a SNAPSHOT artifact. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Artifact(String groupId,
String artifactId,
String version,
String classifier,
String type,
long timestamp,
int buildNumber)
groupId - The groupId.artifactId - The artifactId.version - The version.classifier - The classifier (or null).type - The type.timestamp - The timestamp.buildNumber - The build number.
public Artifact(String groupId,
String artifactId,
String version,
String type,
long timestamp,
int buildNumber)
groupId - The groupId.artifactId - The artifactId.version - The version.type - The type.timestamp - The timestamp.buildNumber - The build number.
public Artifact(String groupId,
String artifactId,
String version,
String classifier,
String type)
groupId - The groupId.artifactId - The artifactId.version - The version.classifier - The classifier (or null).type - The type.
public Artifact(String groupId,
String artifactId,
String version,
String type)
groupId - The groupId.artifactId - The artifactId.version - The version.type - The type.| Method Detail |
|---|
public String getName()
public String getGroupId()
public String getArtifactId()
public String getVersion()
public String getType()
public String getClassifier()
null).
null).public Long getTimestamp()
null).
null).public Integer getBuildNumber()
null).
null).public String getTimestampString()
yyyyMMdd.HHmmss string) of the artifact
(may be null).
yyyyMMdd.HHmmss string) of the artifact
(may be null).public String getTimestampVersion()
getVersion().getVersion().getVersion() with
SNAPSHOT replaced by getTimestampString() and the getBuildNumber() separated
by a -.
public boolean isSnapshot()
true if and only if the artifact is a SNAPSHOT artifact.
true if and only if the artifact is a SNAPSHOT artifact.public boolean equals(Object o)
equals in class Objectpublic boolean equalSnapshots(Artifact artifact)
equals(Object) that matches SNAPSHOTs with their corresponding timestamped versions.
artifact - the artifact to compare with.
true if this artifact is the same as the specified artifact (where timestamps are ignored
for SNAPSHOT versions).public int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic int compareTo(Object o)
compareTo in interface Comparable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||