# Interface MavenArtifact

All Superinterfaces:
  `Buildable, PublicationArtifact`

public interface MavenArtifact extends PublicationArtifact
An artifact published as part of a `MavenPublication`.

Since:
  1.5

- ## Method Summary

  Modifier and Type
  Method
  Description
  `@Nullable String`
  `getClassifier()`
  The classifier used to publish the artifact file.
  `String`
  `getExtension()`
  The extension used to publish the artifact file, never `null`.
  `void`
  `setClassifier(@Nullable String classifier)`
  Sets the classifier used to publish the artifact file.
  `void`
  `setExtension(String extension)`
  Sets the extension used to publish the artifact file.

  ### Methods inherited from interface Buildable

  `getBuildDependencies`

  ### Methods inherited from interface PublicationArtifact

  `builtBy, getFile`

- ## Method Details

  - ### getExtension

    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.
    Since:
      1.5

  - ### setExtension

    void setExtension(String extension)
    Sets the extension used to publish the artifact file.
    Parameters:
      `extension` - The extension.
    Since:
      1.5

  - ### getClassifier

    @Nullable 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.
    Since:
      1.5

  - ### setClassifier

    void setClassifier(@Nullable String classifier)
    Sets the classifier used to publish the artifact file.
    Parameters:
      `classifier` - The classifier.
    Since:
      1.5