public abstract class AbstractArtifact extends Object implements Artifact
Object.equals(Object), Object.hashCode() and
Object.toString().| Constructor and Description |
|---|
AbstractArtifact() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
protected static boolean |
isSnapshot(String version) |
protected Artifact |
newInstance(String groupId,
String artifactId,
String classifier,
String extension,
String version,
Map<String,String> properties,
File file)
Creates a new artifact with the specified coordinates, properties and file.
|
Artifact |
setFile(File file)
Sets the file of the artifact.
|
Artifact |
setProperties(Map<String,String> properties)
Sets the properties for the artifact.
|
Artifact |
setVersion(String version)
Sets the version of this artifact.
|
protected static String |
toBaseVersion(String version) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetArtifactId, getBaseVersion, getClassifier, getExtension, getFile, getGroupId, getProperties, getProperty, getVersion, isSnapshotprotected static boolean isSnapshot(String version)
protected Artifact newInstance(String groupId, String artifactId, String classifier, String extension, String version, Map<String,String> properties, File file)
groupId - The group identifier of the artifact, may be null.artifactId - The artifact identifier of the artifact, may be null.classifier - The classifier of the artifact, may be null.extension - The file extension of the artifact, may be null.version - The version of the artifact, may be null.properties - The properties of the artifact, may be null if none. The method may assume immutability
of the supplied map.file - The resolved file of the artifact, may be null.public Artifact setVersion(String version)
ArtifactsetVersion in interface Artifactversion - The version of this artifact, may be null or empty.null.public Artifact setFile(File file)
Artifactpublic Artifact setProperties(Map<String,String> properties)
ArtifactsetProperties in interface Artifactproperties - The properties for the artifact, may be null.null.Copyright © 2010-2014 Sonatype, Inc.. All Rights Reserved.