Class ActiveProjectArtifact
- java.lang.Object
-
- org.apache.maven.project.artifact.ActiveProjectArtifact
-
- All Implemented Interfaces:
Comparable<Artifact>,Artifact
public class ActiveProjectArtifact extends Object implements Artifact
Wraps an active project instance to be able to receive updates from its artifact without affecting the original attributes of this artifact.- Version:
- $Id: ActiveProjectArtifact.java 767324 2009-04-21 22:53:49Z jdcasey $
- Author:
- Brett Porter
-
-
Field Summary
-
Fields inherited from interface org.apache.maven.artifact.Artifact
LATEST_VERSION, RELEASE_VERSION, SCOPE_COMPILE, SCOPE_IMPORT, SCOPE_PROVIDED, SCOPE_RUNTIME, SCOPE_SYSTEM, SCOPE_TEST, SNAPSHOT_VERSION, VERSION_FILE_PATTERN
-
-
Constructor Summary
Constructors Constructor Description ActiveProjectArtifact(MavenProject project, Artifact artifact)
-
Method Summary
-
-
-
Constructor Detail
-
ActiveProjectArtifact
public ActiveProjectArtifact(MavenProject project, Artifact artifact)
-
-
Method Detail
-
getGroupId
public String getGroupId()
- Specified by:
getGroupIdin interfaceArtifact
-
getArtifactId
public String getArtifactId()
- Specified by:
getArtifactIdin interfaceArtifact
-
getVersion
public String getVersion()
- Specified by:
getVersionin interfaceArtifact
-
setVersion
public void setVersion(String version)
- Specified by:
setVersionin interfaceArtifact
-
getScope
public String getScope()
Get the scope of the artifact. If the artifact is a standalone rather than a dependency, it's scope will benull. 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.
-
getClassifier
public String getClassifier()
- Specified by:
getClassifierin interfaceArtifact
-
hasClassifier
public boolean hasClassifier()
- Specified by:
hasClassifierin interfaceArtifact
-
getBaseVersion
public String getBaseVersion()
- Specified by:
getBaseVersionin interfaceArtifact
-
setBaseVersion
public void setBaseVersion(String baseVersion)
- Specified by:
setBaseVersionin interfaceArtifact
-
getDependencyConflictId
public String getDependencyConflictId()
- Specified by:
getDependencyConflictIdin interfaceArtifact
-
addMetadata
public void addMetadata(ArtifactMetadata metadata)
- Specified by:
addMetadatain interfaceArtifact
-
getMetadataList
public Collection<ArtifactMetadata> getMetadataList()
- Specified by:
getMetadataListin interfaceArtifact
-
setRepository
public void setRepository(ArtifactRepository remoteRepository)
- Specified by:
setRepositoryin interfaceArtifact
-
getRepository
public ArtifactRepository getRepository()
- Specified by:
getRepositoryin interfaceArtifact
-
updateVersion
public void updateVersion(String version, ArtifactRepository localRepository)
- Specified by:
updateVersionin interfaceArtifact
-
getDownloadUrl
public String getDownloadUrl()
- Specified by:
getDownloadUrlin interfaceArtifact
-
setDownloadUrl
public void setDownloadUrl(String downloadUrl)
- Specified by:
setDownloadUrlin interfaceArtifact
-
getDependencyFilter
public ArtifactFilter getDependencyFilter()
- Specified by:
getDependencyFilterin interfaceArtifact
-
setDependencyFilter
public void setDependencyFilter(ArtifactFilter artifactFilter)
- Specified by:
setDependencyFilterin interfaceArtifact
-
getArtifactHandler
public ArtifactHandler getArtifactHandler()
- Specified by:
getArtifactHandlerin interfaceArtifact
-
getDependencyTrail
public List<String> getDependencyTrail()
- Specified by:
getDependencyTrailin interfaceArtifact- Returns:
List<String> with artifact ids
-
setDependencyTrail
public void setDependencyTrail(List<String> dependencyTrail)
- Specified by:
setDependencyTrailin interfaceArtifact- Parameters:
dependencyTrail-List<String> with artifact ids
-
getVersionRange
public VersionRange getVersionRange()
- Specified by:
getVersionRangein interfaceArtifact
-
setVersionRange
public void setVersionRange(VersionRange newRange)
- Specified by:
setVersionRangein interfaceArtifact
-
selectVersion
public void selectVersion(String version)
- Specified by:
selectVersionin interfaceArtifact
-
setGroupId
public void setGroupId(String groupId)
- Specified by:
setGroupIdin interfaceArtifact
-
setArtifactId
public void setArtifactId(String artifactId)
- Specified by:
setArtifactIdin interfaceArtifact
-
isSnapshot
public boolean isSnapshot()
- Specified by:
isSnapshotin interfaceArtifact
-
compareTo
public int compareTo(Artifact a)
- Specified by:
compareToin interfaceComparable<Artifact>
-
setResolved
public void setResolved(boolean resolved)
- Specified by:
setResolvedin interfaceArtifact
-
isResolved
public boolean isResolved()
- Specified by:
isResolvedin interfaceArtifact
-
setResolvedVersion
public void setResolvedVersion(String version)
- Specified by:
setResolvedVersionin interfaceArtifact
-
setArtifactHandler
public void setArtifactHandler(ArtifactHandler handler)
- Specified by:
setArtifactHandlerin interfaceArtifact
-
setRelease
public void setRelease(boolean release)
- Specified by:
setReleasein interfaceArtifact
-
getAvailableVersions
public List<ArtifactVersion> getAvailableVersions()
- Specified by:
getAvailableVersionsin interfaceArtifact
-
setAvailableVersions
public void setAvailableVersions(List<ArtifactVersion> versions)
- Specified by:
setAvailableVersionsin interfaceArtifact
-
isOptional
public boolean isOptional()
- Specified by:
isOptionalin interfaceArtifact
-
getSelectedVersion
public ArtifactVersion getSelectedVersion() throws OverConstrainedVersionException
- Specified by:
getSelectedVersionin interfaceArtifact- Throws:
OverConstrainedVersionException
-
isSelectedVersionKnown
public boolean isSelectedVersionKnown() throws OverConstrainedVersionException- Specified by:
isSelectedVersionKnownin interfaceArtifact- Throws:
OverConstrainedVersionException
-
setOptional
public void setOptional(boolean optional)
- Specified by:
setOptionalin interfaceArtifact
-
getMetadata
public ArtifactMetadata getMetadata(Class<?> metadataClass)
- Specified by:
getMetadatain interfaceArtifact
-
-