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' }
Modifiers | Name | Description |
---|---|---|
String |
DEFAULT_MAVEN_CENTRAL_REPO_NAME |
|
String |
DEFAULT_MAVEN_LOCAL_REPO_NAME |
|
String |
MAVEN_CENTRAL_URL |
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} |
Methods inherited from class | Name |
---|---|
interface NamedDomainObjectList |
findAll, matching, matching, withType |
Adds a repository to this container, at the end of the repository sequence.
repository
- The repository to add.Adds a repository to this container, at the start of the repository sequence.
repository
- The repository to add.Adds a repository to this container, at the end of the repository sequence.
repository
- The repository to add.{@inheritDoc}
{@inheritDoc}
{@inheritDoc}