org.apache.maven.artifact
Interface Artifact
- All Superinterfaces:
- Comparable<Artifact>
- All Known Implementing Classes:
- DefaultArtifact
public interface Artifact
- extends Comparable<Artifact>
Description of an artifact.
LATEST_VERSION
static final String LATEST_VERSION
- See Also:
- Constant Field Values
SNAPSHOT_VERSION
static final String SNAPSHOT_VERSION
- See Also:
- Constant Field Values
VERSION_FILE_PATTERN
static final Pattern VERSION_FILE_PATTERN
SCOPE_COMPILE
static final String SCOPE_COMPILE
- See Also:
- Constant Field Values
SCOPE_TEST
static final String SCOPE_TEST
- See Also:
- Constant Field Values
SCOPE_RUNTIME
static final String SCOPE_RUNTIME
- See Also:
- Constant Field Values
SCOPE_PROVIDED
static final String SCOPE_PROVIDED
- See Also:
- Constant Field Values
SCOPE_SYSTEM
static final String SCOPE_SYSTEM
- See Also:
- Constant Field Values
SCOPE_IMPORT
static final String SCOPE_IMPORT
- See Also:
- Constant Field Values
RELEASE_VERSION
static final String RELEASE_VERSION
- See Also:
- Constant Field Values
getGroupId
String getGroupId()
getArtifactId
String getArtifactId()
getVersion
String getVersion()
setVersion
void setVersion(String version)
getScope
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
getType
String getType()
getClassifier
String getClassifier()
hasClassifier
boolean hasClassifier()
getFile
File getFile()
setFile
void setFile(File destination)
getBaseVersion
String getBaseVersion()
setBaseVersion
void setBaseVersion(String baseVersion)
getId
String getId()
getDependencyConflictId
String getDependencyConflictId()
addMetadata
void addMetadata(ArtifactMetadata metadata)
getMetadata
ArtifactMetadata getMetadata(Class<?> metadataClass)
getMetadataList
Collection<ArtifactMetadata> getMetadataList()
setRepository
void setRepository(ArtifactRepository remoteRepository)
getRepository
ArtifactRepository getRepository()
updateVersion
void updateVersion(String version,
ArtifactRepository localRepository)
getDownloadUrl
String getDownloadUrl()
setDownloadUrl
void setDownloadUrl(String downloadUrl)
getDependencyFilter
ArtifactFilter getDependencyFilter()
setDependencyFilter
void setDependencyFilter(ArtifactFilter artifactFilter)
getArtifactHandler
ArtifactHandler getArtifactHandler()
getDependencyTrail
List<String> getDependencyTrail()
- Returns:
List
< String
> with artifact ids
setDependencyTrail
void setDependencyTrail(List<String> dependencyTrail)
- Parameters:
dependencyTrail
- List
< String
> with artifact ids
setScope
void setScope(String scope)
getVersionRange
VersionRange getVersionRange()
setVersionRange
void setVersionRange(VersionRange newRange)
selectVersion
void selectVersion(String version)
setGroupId
void setGroupId(String groupId)
setArtifactId
void setArtifactId(String artifactId)
isSnapshot
boolean isSnapshot()
setResolved
void setResolved(boolean resolved)
isResolved
boolean isResolved()
setResolvedVersion
void setResolvedVersion(String version)
setArtifactHandler
void setArtifactHandler(ArtifactHandler handler)
isRelease
boolean isRelease()
setRelease
void setRelease(boolean release)
getAvailableVersions
List<ArtifactVersion> getAvailableVersions()
setAvailableVersions
void setAvailableVersions(List<ArtifactVersion> versions)
isOptional
boolean isOptional()
setOptional
void setOptional(boolean optional)
getSelectedVersion
ArtifactVersion getSelectedVersion()
throws OverConstrainedVersionException
- Throws:
OverConstrainedVersionException
isSelectedVersionKnown
boolean isSelectedVersionKnown()
throws OverConstrainedVersionException
- Throws:
OverConstrainedVersionException
Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.