org.apache.maven.artifact
Interface Artifact
public
interface
Artifact
extends Comparable
Description of an artifact.
UNKNOWN: do we really need an interface here? get rid of the multiple states we can have (project, parent, etc artifacts, file == null, snapshot, etc) - construct subclasses and use accordingly?
public String LATEST_VERSION
public String RELEASE_VERSION
public String SCOPE_COMPILE
public String SCOPE_PROVIDED
public String SCOPE_RUNTIME
public String SCOPE_SYSTEM
public String SCOPE_TEST
public String SNAPSHOT_VERSION
public Pattern VERSION_FILE_PATTERN
public String getArtifactId()
public List getAvailableVersions()
public String getBaseVersion()
public String getClassifier()
public String getDependencyConflictId()
public List getDependencyTrail()
public String getDownloadUrl()
public File getFile()
public String getGroupId()
public String getId()
public Collection getMetadataList()
public String getScope()
Get the scope of the artifact. If the artifact is a standalone rather than a dependency, it's scope will be
null
. The scope may not be the same as it was declared on the original dependency, as this is the
result of combining it with the main project scope.
Returns: the scope
public String getType()
public String getVersion()
public boolean hasClassifier()
public boolean isOptional()
public boolean isRelease()
public boolean isResolved()
public boolean isSelectedVersionKnown()
public boolean isSnapshot()
public void selectVersion(String version)
UNKNOWN: remove, a quick hack for the lifecycle executor
public void setArtifactId(String artifactId)
public void setAvailableVersions(List versions)
public void setBaseVersion(String baseVersion)
UNKNOWN: would like to get rid of this - or at least only have one. Base version should be immutable.
public void setDependencyTrail(List dependencyTrail)
public void setDownloadUrl(String downloadUrl)
public void setFile(File destination)
public void setGroupId(String groupId)
public void setOptional(boolean optional)
public void setRelease(boolean release)
public void setResolved(boolean resolved)
public void setResolvedVersion(String version)
public void setScope(String scope)
public void setVersion(String version)
Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.