org.apache.maven.artifact
Interface Artifact

All Superinterfaces:
Comparable<Artifact>
All Known Implementing Classes:
DefaultArtifact

public interface Artifact
extends Comparable<Artifact>

Maven Artifact interface. Notice that it mixes artifact definition concepts (groupId, artifactId, version) with dependency information (version range, scope).


Field Summary
static String LATEST_VERSION
           
static String RELEASE_VERSION
           
static String SCOPE_COMPILE
           
static String SCOPE_COMPILE_PLUS_RUNTIME
           
static String SCOPE_IMPORT
           
static String SCOPE_PROVIDED
           
static String SCOPE_RUNTIME
           
static String SCOPE_RUNTIME_PLUS_SYSTEM
           
static String SCOPE_SYSTEM
           
static String SCOPE_TEST
           
static String SNAPSHOT_VERSION
           
static Pattern VERSION_FILE_PATTERN
           
 
Method Summary
 void addMetadata(ArtifactMetadata metadata)
           
 ArtifactHandler getArtifactHandler()
           
 String getArtifactId()
           
 List<ArtifactVersion> getAvailableVersions()
           
 String getBaseVersion()
           
 String getClassifier()
           
 String getDependencyConflictId()
           
 ArtifactFilter getDependencyFilter()
           
 List<String> getDependencyTrail()
           
 String getDownloadUrl()
           
 File getFile()
           
 String getGroupId()
           
 String getId()
           
 Collection<ArtifactMetadata> getMetadataList()
           
 ArtifactRepository getRepository()
           
 String getScope()
           
 ArtifactVersion getSelectedVersion()
           
 String getType()
           
 String getVersion()
           
 VersionRange getVersionRange()
           
 boolean hasClassifier()
           
 boolean isOptional()
           
 boolean isRelease()
           
 boolean isResolved()
           
 boolean isSelectedVersionKnown()
           
 boolean isSnapshot()
           
 void selectVersion(String version)
           
 void setArtifactHandler(ArtifactHandler handler)
           
 void setArtifactId(String artifactId)
           
 void setAvailableVersions(List<ArtifactVersion> versions)
           
 void setBaseVersion(String baseVersion)
           
 void setDependencyFilter(ArtifactFilter artifactFilter)
           
 void setDependencyTrail(List<String> dependencyTrail)
           
 void setDownloadUrl(String downloadUrl)
           
 void setFile(File destination)
           
 void setGroupId(String groupId)
           
 void setOptional(boolean optional)
           
 void setRelease(boolean release)
           
 void setRepository(ArtifactRepository remoteRepository)
           
 void setResolved(boolean resolved)
           
 void setResolvedVersion(String version)
           
 void setScope(String scope)
           
 void setVersion(String version)
           
 void setVersionRange(VersionRange newRange)
           
 void updateVersion(String version, ArtifactRepository localRepository)
           
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

RELEASE_VERSION

static final String RELEASE_VERSION
See Also:
Constant Field Values

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_COMPILE_PLUS_RUNTIME

static final String SCOPE_COMPILE_PLUS_RUNTIME
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_RUNTIME_PLUS_SYSTEM

static final String SCOPE_RUNTIME_PLUS_SYSTEM
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
Method Detail

getGroupId

String getGroupId()

getArtifactId

String getArtifactId()

getVersion

String getVersion()

setVersion

void setVersion(String version)

getScope

String getScope()

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)

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()

setDependencyTrail

void setDependencyTrail(List<String> dependencyTrail)

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–2013 The Apache Software Foundation. All rights reserved.