org.sonatype.aether.util.artifact
Class SubArtifact
java.lang.Object
org.sonatype.aether.util.artifact.AbstractArtifact
org.sonatype.aether.util.artifact.SubArtifact
- All Implemented Interfaces:
- Artifact
public final class SubArtifact
- extends AbstractArtifact
An artifact whose identity is derived from another artifact.
- Author:
- Benjamin Bentmann
SubArtifact
public SubArtifact(Artifact mainArtifact,
String classifier,
String extension)
- Creates a new sub artifact. The classifier and extension specified for this artifact may use the asterisk
character "*" to refer to the corresponding property of the main artifact. For instance, the classifier
"*-sources" can be used to refer to the source attachment of an artifact. Likewise, the extension "*.asc" can be
used to refer to the GPG signature of an artifact.
- Parameters:
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.
SubArtifact
public SubArtifact(Artifact mainArtifact,
String classifier,
String extension,
File file)
- Creates a new sub artifact. The classifier and extension specified for this artifact may use the asterisk
character "*" to refer to the corresponding property of the main artifact. For instance, the classifier
"*-sources" can be used to refer to the source attachment of an artifact. Likewise, the extension "*.asc" can be
used to refer to the GPG signature of an artifact.
- Parameters:
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.
getGroupId
public String getGroupId()
getArtifactId
public String getArtifactId()
getVersion
public String getVersion()
setVersion
public Artifact setVersion(String version)
- Specified by:
setVersion in interface Artifact- Overrides:
setVersion in class AbstractArtifact
getBaseVersion
public String getBaseVersion()
isSnapshot
public boolean isSnapshot()
getClassifier
public String getClassifier()
getExtension
public String getExtension()
getFile
public File getFile()
setFile
public Artifact setFile(File file)
- Specified by:
setFile in interface Artifact- Overrides:
setFile in class AbstractArtifact
getProperty
public String getProperty(String key,
String defaultValue)
getProperties
public Map<String,String> getProperties()
Copyright © 2010-2011 Sonatype, Inc.. All Rights Reserved.