MavenArtifact (Gradle API 2.11)
Date: 2016-02-08

Package: org.gradle.api.publish.maven

## [Java] Interface MavenArtifact

- org.gradle.api.Buildable

- All Superinterfaces:
    Buildable

  An artifact published as part of a MavenPublication.

- - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `void` | `builtBy(Object... tasks)` Registers some tasks which build this artifact.
    `String` | `getClassifier()` The classifier used to publish the artifact file.
    `String` | `getExtension()` The extension used to publish the artifact file, never `null`.
    `File` | `getFile()` The actual file contents to publish.
    `void` | `setClassifier(String classifier)` Sets the classifier used to publish the artifact file.
    `void` | `setExtension(String extension)` Sets the extension used to publish the artifact file.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `interface Buildable` | `getBuildDependencies`

- - ### Method Detail

    - #### public void builtBy(Object... tasks)

      Registers some tasks which build this artifact.

      Parameters:
        `tasks` - The tasks. These are evaluated as per Task.dependsOn.

    - #### @Nullable public String getClassifier()

      The classifier used to publish the artifact file. A `null` value (the default) indicates that this artifact will be published without a classifier.

    - #### public String getExtension()

      The extension used to publish the artifact file, never `null`. For an artifact without an extension, this value will be an empty String.

    - #### public File getFile()

      The actual file contents to publish.

    - #### public void setClassifier(@Nullable String classifier)

      Sets the classifier used to publish the artifact file.

      Parameters:
        `classifier` - The classifier.

    - #### public void setExtension(String extension)

      Sets the extension used to publish the artifact file.

      Parameters:
        `extension` - The extension.