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