org.apache.maven.artifact

## Interface Artifact

- All Superinterfaces:
    java.lang.Comparable<Artifact>
  All Known Implementing Classes:
    ActiveProjectArtifact, AttachedArtifact, DefaultArtifact

      public interface Artifact
      extends java.lang.Comparable<Artifact>

  Description of an artifact.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `LATEST_VERSION`
    `static java.lang.String` | `RELEASE_VERSION`
    `static java.lang.String` | `SCOPE_COMPILE`
    `static java.lang.String` | `SCOPE_IMPORT`
    `static java.lang.String` | `SCOPE_PROVIDED`
    `static java.lang.String` | `SCOPE_RUNTIME`
    `static java.lang.String` | `SCOPE_SYSTEM`
    `static java.lang.String` | `SCOPE_TEST`
    `static java.lang.String` | `SNAPSHOT_VERSION`
    `static java.util.regex.Pattern` | `VERSION_FILE_PATTERN`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addMetadata(ArtifactMetadata metadata)`
    `ArtifactHandler` | `getArtifactHandler()`
    `java.lang.String` | `getArtifactId()`
    `java.util.List<ArtifactVersion>` | `getAvailableVersions()`
    `java.lang.String` | `getBaseVersion()`
    `java.lang.String` | `getClassifier()`
    `java.lang.String` | `getDependencyConflictId()`
    `ArtifactFilter` | `getDependencyFilter()`
    `java.util.List<java.lang.String>` | `getDependencyTrail()`
    `java.lang.String` | `getDownloadUrl()`
    `java.io.File` | `getFile()`
    `java.lang.String` | `getGroupId()`
    `java.lang.String` | `getId()`
    `ArtifactMetadata` | `getMetadata(java.lang.Class<?> metadataClass)`
    `java.util.Collection<ArtifactMetadata>` | `getMetadataList()`
    `ArtifactRepository` | `getRepository()`
    `java.lang.String` | `getScope()` Get the scope of the artifact.
    `ArtifactVersion` | `getSelectedVersion()`
    `java.lang.String` | `getType()`
    `java.lang.String` | `getVersion()`
    `VersionRange` | `getVersionRange()`
    `boolean` | `hasClassifier()`
    `boolean` | `isOptional()`
    `boolean` | `isRelease()`
    `boolean` | `isResolved()`
    `boolean` | `isSelectedVersionKnown()`
    `boolean` | `isSnapshot()`
    `void` | `selectVersion(java.lang.String version)`
    `void` | `setArtifactHandler(ArtifactHandler handler)`
    `void` | `setArtifactId(java.lang.String artifactId)`
    `void` | `setAvailableVersions(java.util.List<ArtifactVersion> versions)`
    `void` | `setBaseVersion(java.lang.String baseVersion)`
    `void` | `setDependencyFilter(ArtifactFilter artifactFilter)`
    `void` | `setDependencyTrail(java.util.List<java.lang.String> dependencyTrail)`
    `void` | `setDownloadUrl(java.lang.String downloadUrl)`
    `void` | `setFile(java.io.File destination)`
    `void` | `setGroupId(java.lang.String groupId)`
    `void` | `setOptional(boolean optional)`
    `void` | `setRelease(boolean release)`
    `void` | `setRepository(ArtifactRepository remoteRepository)`
    `void` | `setResolved(boolean resolved)`
    `void` | `setResolvedVersion(java.lang.String version)`
    `void` | `setScope(java.lang.String scope)`
    `void` | `setVersion(java.lang.String version)`
    `void` | `setVersionRange(VersionRange newRange)`
    `void` | `updateVersion(java.lang.String version, ArtifactRepository localRepository)`

    - ### Methods inherited from interface java.lang.Comparable

      `compareTo`

- - ### Field Detail

    - #### LATEST_VERSION

          static final java.lang.String LATEST_VERSION

      See Also:
        Constant Field Values

    - #### SNAPSHOT_VERSION

          static final java.lang.String SNAPSHOT_VERSION

      See Also:
        Constant Field Values

    - #### VERSION_FILE_PATTERN

          static final java.util.regex.Pattern VERSION_FILE_PATTERN

    - #### SCOPE_COMPILE

          static final java.lang.String SCOPE_COMPILE

      See Also:
        Constant Field Values

    - #### SCOPE_TEST

          static final java.lang.String SCOPE_TEST

      See Also:
        Constant Field Values

    - #### SCOPE_RUNTIME

          static final java.lang.String SCOPE_RUNTIME

      See Also:
        Constant Field Values

    - #### SCOPE_PROVIDED

          static final java.lang.String SCOPE_PROVIDED

      See Also:
        Constant Field Values

    - #### SCOPE_SYSTEM

          static final java.lang.String SCOPE_SYSTEM

      See Also:
        Constant Field Values

    - #### SCOPE_IMPORT

          static final java.lang.String SCOPE_IMPORT

      See Also:
        Constant Field Values

    - #### RELEASE_VERSION

          static final java.lang.String RELEASE_VERSION

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getGroupId

          java.lang.String getGroupId()

    - #### getArtifactId

          java.lang.String getArtifactId()

    - #### getVersion

          java.lang.String getVersion()

    - #### setVersion

          void setVersion(java.lang.String version)

    - #### getScope

          java.lang.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

          java.lang.String getType()

    - #### getClassifier

          java.lang.String getClassifier()

    - #### hasClassifier

          boolean hasClassifier()

    - #### getFile

          java.io.File getFile()

    - #### setFile

          void setFile(java.io.File destination)

    - #### getBaseVersion

          java.lang.String getBaseVersion()

    - #### setBaseVersion

          void setBaseVersion(java.lang.String baseVersion)

    - #### getId

          java.lang.String getId()

    - #### getDependencyConflictId

          java.lang.String getDependencyConflictId()

    - #### addMetadata

          void addMetadata(ArtifactMetadata metadata)

    - #### getMetadata

          ArtifactMetadata getMetadata(java.lang.Class<?> metadataClass)

    - #### getMetadataList

          java.util.Collection<ArtifactMetadata> getMetadataList()

    - #### setRepository

          void setRepository(ArtifactRepository remoteRepository)

    - #### getRepository

          ArtifactRepository getRepository()

    - #### updateVersion

          void updateVersion(java.lang.String version,
                           ArtifactRepository localRepository)

    - #### getDownloadUrl

          java.lang.String getDownloadUrl()

    - #### setDownloadUrl

          void setDownloadUrl(java.lang.String downloadUrl)

    - #### getDependencyFilter

          ArtifactFilter getDependencyFilter()

    - #### setDependencyFilter

          void setDependencyFilter(ArtifactFilter artifactFilter)

    - #### getArtifactHandler

          ArtifactHandler getArtifactHandler()

    - #### getDependencyTrail

          java.util.List<java.lang.String> getDependencyTrail()

      Returns:
        `List` < `String` > with artifact ids

    - #### setDependencyTrail

          void setDependencyTrail(java.util.List<java.lang.String> dependencyTrail)

      Parameters:
        `dependencyTrail` - `List` < `String` > with artifact ids

    - #### setScope

          void setScope(java.lang.String scope)

    - #### getVersionRange

          VersionRange getVersionRange()

    - #### setVersionRange

          void setVersionRange(VersionRange newRange)

    - #### selectVersion

          void selectVersion(java.lang.String version)

    - #### setGroupId

          void setGroupId(java.lang.String groupId)

    - #### setArtifactId

          void setArtifactId(java.lang.String artifactId)

    - #### isSnapshot

          boolean isSnapshot()

    - #### setResolved

          void setResolved(boolean resolved)

    - #### isResolved

          boolean isResolved()

    - #### setResolvedVersion

          void setResolvedVersion(java.lang.String version)

    - #### setArtifactHandler

          void setArtifactHandler(ArtifactHandler handler)

    - #### isRelease

          boolean isRelease()

    - #### setRelease

          void setRelease(boolean release)

    - #### getAvailableVersions

          java.util.List<ArtifactVersion> getAvailableVersions()

    - #### setAvailableVersions

          void setAvailableVersions(java.util.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`