public final class SubArtifact extends AbstractArtifact
| Constructor and Description |
|---|
SubArtifact(Artifact mainArtifact,
String classifier,
String extension)
Creates a new sub artifact.
|
SubArtifact(Artifact mainArtifact,
String classifier,
String extension,
File file)
Creates a new sub artifact.
|
SubArtifact(Artifact mainArtifact,
String classifier,
String extension,
Map<String,String> properties)
Creates a new sub artifact.
|
SubArtifact(Artifact mainArtifact,
String classifier,
String extension,
Map<String,String> properties,
File file)
Creates a new sub artifact.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getArtifactId()
Gets the artifact identifier of this artifact, for example "maven-model".
|
String |
getBaseVersion()
Gets the base version of this artifact, for example "1.0-SNAPSHOT".
|
String |
getClassifier()
Gets the classifier of this artifact, for example "sources".
|
String |
getExtension()
Gets the (file) extension of this artifact, for example "jar" or "tar.gz".
|
File |
getFile()
Gets the file of this artifact.
|
String |
getGroupId()
Gets the group identifier of this artifact, for example "org.apache.maven".
|
Map<String,String> |
getProperties()
Gets the properties of this artifact.
|
String |
getVersion()
Gets the version of this artifact, for example "1.0-20100529-1213".
|
boolean |
isSnapshot()
Determines whether this artifact uses a snapshot version.
|
Artifact |
setFile(File file)
Sets the file of the artifact.
|
Artifact |
setProperties(Map<String,String> properties)
Sets the properties for the artifact.
|
copyProperties, equals, getProperty, hashCode, setVersion, toStringpublic SubArtifact(Artifact mainArtifact, String classifier, String extension)
mainArtifact - The artifact from which to derive the identity, must not be null.classifier - The classifier for this artifact, may be null if none.extension - The extension for this artifact, may be null if none.public SubArtifact(Artifact mainArtifact, String classifier, String extension, File file)
mainArtifact - The artifact from which to derive the identity, must not be null.classifier - The classifier for this artifact, may be null if none.extension - The extension for this artifact, may be null if none.file - The file for this artifact, may be null if unresolved.public SubArtifact(Artifact mainArtifact, String classifier, String extension, Map<String,String> properties)
mainArtifact - The artifact from which to derive the identity, must not be null.classifier - The classifier for this artifact, may be null if none.extension - The extension for this artifact, may be null if none.properties - The properties of the artifact, may be null.public SubArtifact(Artifact mainArtifact, String classifier, String extension, Map<String,String> properties, File file)
mainArtifact - The artifact from which to derive the identity, must not be null.classifier - The classifier for this artifact, may be null if none.extension - The extension for this artifact, may be null if none.properties - The properties of the artifact, may be null.file - The file for this artifact, may be null if unresolved.public String getGroupId()
Artifactnull.public String getArtifactId()
Artifactnull.public String getVersion()
Artifactnull.public String getBaseVersion()
ArtifactArtifact.getVersion(), the
base version will always refer to the unresolved meta version.getBaseVersion in interface ArtifactgetBaseVersion in class AbstractArtifactnull.public boolean isSnapshot()
ArtifactisSnapshot in interface ArtifactisSnapshot in class AbstractArtifacttrue if the artifact is a snapshot, false otherwise.public String getClassifier()
Artifactnull.public String getExtension()
Artifactnull.public File getFile()
Artifactnull if the artifact isn't resolved.public Artifact setFile(File file)
ArtifactsetFile in interface ArtifactsetFile in class AbstractArtifactfile - The file of the artifact, may be nullnull.public Map<String,String> getProperties()
Artifactnull.ArtifactPropertiespublic Artifact setProperties(Map<String,String> properties)
ArtifactsetProperties in interface ArtifactsetProperties in class AbstractArtifactproperties - The properties for the artifact, may be null.null.ArtifactPropertiesCopyright © 2010-2014 The Eclipse Foundation. All Rights Reserved.