# Interface MavenArtifactRepository

All Superinterfaces:
  `ArtifactRepository, AuthenticationSupported, MetadataSupplierAware, UrlArtifactRepository`

public interface MavenArtifactRepository extends ArtifactRepository, UrlArtifactRepository, AuthenticationSupported, MetadataSupplierAware
An artifact repository which uses a Maven format to store artifacts and meta-data.

Repositories of this type are created by the `RepositoryHandler.maven(org.gradle.api.Action)` group of methods.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Interface
  Description
  `static interface`
  `MavenArtifactRepository.MetadataSources`
  Allows configuring the sources of metadata for a specific repository.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `artifactUrls(Object... urls)`
  Deprecated.
  Maven repositories with separate locations for POMs and artifacts are a Gradle-only feature with no equivalent in Maven.
  `Set<URI>`
  `getArtifactUrls()`
  Deprecated.
  Maven repositories with separate locations for POMs and artifacts are a Gradle-only feature with no equivalent in Maven.
  `MavenArtifactRepository.MetadataSources`
  `getMetadataSources()`
  Returns the current metadata sources configuration for the repository.
  `URI`
  `getUrl()`
  The base URL of this repository.
  `void`
  `mavenContent(Action<? super MavenRepositoryContentDescriptor> configureAction)`
  Configures the content of this Maven repository.
  `void`
  `metadataSources(Action<? super MavenArtifactRepository.MetadataSources> configureAction)`
  Configures the metadata sources for this repository.
  `void`
  `setArtifactUrls(Iterable<?> urls)`
  Deprecated.
  Maven repositories with separate locations for POMs and artifacts are a Gradle-only feature with no equivalent in Maven.
  `void`
  `setArtifactUrls(Set<URI> urls)`
  Deprecated.
  Maven repositories with separate locations for POMs and artifacts are a Gradle-only feature with no equivalent in Maven.
  `void`
  `setUrl(Object url)`
  Sets the base URL of this repository.
  `void`
  `setUrl(URI url)`
  Sets the base URL of this repository.

  ### Methods inherited from interface ArtifactRepository

  `content, getName, setName`

  ### Methods inherited from interface AuthenticationSupported

  `authentication, credentials, credentials, credentials, getAuthentication, getCredentials, getCredentials`

  ### Methods inherited from interface MetadataSupplierAware

  `setComponentVersionsLister, setComponentVersionsLister, setMetadataSupplier, setMetadataSupplier`

  ### Methods inherited from interface UrlArtifactRepository

  `getAllowInsecureContinueWhenDisabled, isAllowInsecureProtocol, setAllowInsecureProtocol`

- ## Method Details

  - ### getUrl

    URI getUrl()
    The base URL of this repository. This URL is used to find both POMs and artifact files.
    Specified by:
      `getUrl` in interface `UrlArtifactRepository`
    Returns:
      The URL.

  - ### setUrl

    void setUrl(URI url)
    Sets the base URL of this repository. This URL is used to find both POMs and artifact files.
    Specified by:
      `setUrl` in interface `UrlArtifactRepository`
    Parameters:
      `url` - The base URL.
    Since:
      4.0

  - ### setUrl

    void setUrl(Object url)
    Sets the base URL of this repository. This URL is used to find both POMs and artifact files.

    The provided value is evaluated as per `Project.uri(Object)`. This means, for example, you can pass in a `File` object, or a relative path to be evaluated relative to the project directory.

    Specified by:
      `setUrl` in interface `UrlArtifactRepository`
    Parameters:
      `url` - The base URL.

  - ### getArtifactUrls

    @Deprecated Set<URI> getArtifactUrls()
    Deprecated.
    Maven repositories with separate locations for POMs and artifacts are a Gradle-only feature with no equivalent in Maven. This method is scheduled to be removed in Gradle 10.
    Returns the additional URLs to use to find artifact files. Note that these URLs are not used to find POM files.
    Returns:
      The additional URLs. Returns an empty list if there are no such URLs.

  - ### artifactUrls

    @Deprecated void artifactUrls(Object... urls)
    Deprecated.
    Maven repositories with separate locations for POMs and artifacts are a Gradle-only feature with no equivalent in Maven. This method is scheduled to be removed in Gradle 10.
    Adds some additional URLs to use to find artifact files. Note that these URLs are not used to find POM files.

    The provided values are evaluated as per `Project.uri(Object)`. This means, for example, you can pass in a `File` object, or a relative path to be evaluated relative to the project directory.

    Parameters:
      `urls` - The URLs to add.

  - ### setArtifactUrls

    @Deprecated void setArtifactUrls(Set<URI> urls)
    Deprecated.
    Maven repositories with separate locations for POMs and artifacts are a Gradle-only feature with no equivalent in Maven. This method is scheduled to be removed in Gradle 10.
    Sets the additional URLs to use to find artifact files. Note that these URLs are not used to find POM files.
    Parameters:
      `urls` - The URLs.
    Since:
      4.0

  - ### setArtifactUrls

    @Deprecated void setArtifactUrls(Iterable<?> urls)
    Deprecated.
    Maven repositories with separate locations for POMs and artifacts are a Gradle-only feature with no equivalent in Maven. This method is scheduled to be removed in Gradle 10.
    Sets the additional URLs to use to find artifact files. Note that these URLs are not used to find POM files.

    The provided values are evaluated as per `Project.uri(Object)`. This means, for example, you can pass in a `File` object, or a relative path to be evaluated relative to the project directory.

    Parameters:
      `urls` - The URLs.

  - ### metadataSources

    void metadataSources(Action<? super MavenArtifactRepository.MetadataSources> configureAction)
    Configures the metadata sources for this repository. This method will replace any previously configured sources of metadata.
    Parameters:
      `configureAction` - the configuration of metadata sources.
    Since:
      4.5

  - ### getMetadataSources

    MavenArtifactRepository.MetadataSources getMetadataSources()
    Returns the current metadata sources configuration for the repository.
    Since:
      6.4

  - ### mavenContent

    void mavenContent(Action<? super MavenRepositoryContentDescriptor> configureAction)
    Configures the content of this Maven repository.
    Parameters:
      `configureAction` - the configuration action
    Since:
      5.1