Package: org.gradle.api.artifacts

## [Java] Interface ArtifactRepositoryContainer

- org.gradle.api.NamedDomainObjectCollection

- All Superinterfaces:
    NamedDomainObjectList, Configurable, Iterable, DomainObjectCollection, Collection, NamedDomainObjectCollection

  A `ResolverContainer` is responsible for managing a set of ArtifactRepository instances. Repositories are arranged in a sequence.

  You can obtain a `ResolverContainer` instance by calling Project.getRepositories or using the `repositories` property in your build script.

  The resolvers in a container are accessible as read-only properties of the container, using the name of the resolver as the property name. For example:

       repositories.maven { name 'myResolver' }
       repositories.myResolver.url = 'some-url'

  A dynamic method is added for each resolver which takes a configuration closure. This is equivalent to calling getByName(String, groovy.lang.Closure). For example:

       repositories.maven { name 'myResolver' }
       repositories.myResolver {
           url 'some-url'
       }

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `String` | `DEFAULT_MAVEN_CENTRAL_REPO_NAME` |
    `String` | `DEFAULT_MAVEN_LOCAL_REPO_NAME` |
    `String` | `MAVEN_CENTRAL_URL` |

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `boolean` | `add(ArtifactRepository repository)` Adds a repository to this container, at the end of the repository sequence.
    `void` | `addFirst(ArtifactRepository repository)` Adds a repository to this container, at the start of the repository sequence.
    `void` | `addLast(ArtifactRepository repository)` Adds a repository to this container, at the end of the repository sequence.
    `ArtifactRepository` | `getAt(String name)` {@inheritDoc}
    `ArtifactRepository` | `getByName(String name)` {@inheritDoc}
    `ArtifactRepository` | `getByName(String name, Closure configureClosure)` {@inheritDoc}

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `interface NamedDomainObjectList` | `findAll, matching, matching, withType`
    `interface NamedDomainObjectCollection` | `add, addAll, addRule, addRule, findByName, getAsMap, getAt, getByName, getByName, getNamer, getNames, getRules, matching, matching, withType`
    `interface List` | `add, add, get, equals, hashCode, indexOf, clear, contains, isEmpty, lastIndexOf, size, subList, toArray, toArray, addAll, addAll, iterator, remove, remove, set, containsAll, listIterator, listIterator, removeAll, retainAll`

- - ### Field Detail

    - #### public String DEFAULT_MAVEN_CENTRAL_REPO_NAME

    - #### public String DEFAULT_MAVEN_LOCAL_REPO_NAME

    - #### public String MAVEN_CENTRAL_URL

  - ### Method Detail

    - #### public boolean add(ArtifactRepository repository)

      Adds a repository to this container, at the end of the repository sequence.

      Parameters:
        `repository` - The repository to add.

    - #### public void addFirst(ArtifactRepository repository)

      Adds a repository to this container, at the start of the repository sequence.

      Parameters:
        `repository` - The repository to add.

    - #### public void addLast(ArtifactRepository repository)

      Adds a repository to this container, at the end of the repository sequence.

      Parameters:
        `repository` - The repository to add.

    - #### public ArtifactRepository getAt(String name)

      {@inheritDoc}

    - #### public ArtifactRepository getByName(String name)

      {@inheritDoc}

    - #### public ArtifactRepository getByName(String name, Closure configureClosure)

      {@inheritDoc}