public interface ArtifactRepositoryContainer extends NamedDomainObjectList<ArtifactRepository>, org.gradle.util.Configurable<ArtifactRepositoryContainer>
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:
resolvers.addLast(name: 'myResolver') resolvers.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:
resolvers.addLast(name: 'myResolver')
resolvers.myResolver {
url 'some-url'
}
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_CACHE_ARTIFACT_PATTERN |
static java.lang.String |
DEFAULT_CACHE_IVY_PATTERN |
static java.lang.String |
DEFAULT_MAVEN_CENTRAL_REPO_NAME |
static java.lang.String |
DEFAULT_MAVEN_LOCAL_REPO_NAME |
static java.lang.String |
INTERNAL_REPOSITORY_NAME |
static java.lang.String |
MAVEN_CENTRAL_URL |
static java.lang.String |
MAVEN_REPO_PATTERN |
static java.lang.String |
RESOLVER_NAME |
static java.lang.String |
RESOLVER_URL |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(ArtifactRepository repository)
Adds a repository to this container, at the end of the repository sequence.
|
boolean |
add(org.apache.ivy.plugins.resolver.DependencyResolver resolver)
Adds a repository to this container, at the end of the repository sequence.
|
boolean |
add(org.apache.ivy.plugins.resolver.DependencyResolver resolver,
Closure configureClosure)
Adds a repository to this container, at the end of the repository sequence.
|
org.apache.ivy.plugins.resolver.DependencyResolver |
addAfter(java.lang.Object userDescription,
java.lang.String previousResolver)
Adds a resolver to this container, after the given resolver.
|
org.apache.ivy.plugins.resolver.DependencyResolver |
addAfter(java.lang.Object userDescription,
java.lang.String previousResolver,
Closure configureClosure)
Adds a resolver to this container, after the given resolver.
|
org.apache.ivy.plugins.resolver.DependencyResolver |
addBefore(java.lang.Object userDescription,
java.lang.String nextResolver)
Adds a resolver to this container, before the given resolver.
|
org.apache.ivy.plugins.resolver.DependencyResolver |
addBefore(java.lang.Object userDescription,
java.lang.String nextResolver,
Closure configureClosure)
Adds a resolver to this container, before the given resolver.
|
void |
addFirst(ArtifactRepository repository)
Adds a repository to this container, at the start of the repository sequence.
|
org.apache.ivy.plugins.resolver.DependencyResolver |
addFirst(java.lang.Object userDescription)
Adds a resolver to this container, at the start of the resolver sequence.
|
org.apache.ivy.plugins.resolver.DependencyResolver |
addFirst(java.lang.Object userDescription,
Closure configureClosure)
Adds a resolver to this container, at the start of the resolver sequence.
|
void |
addLast(ArtifactRepository repository)
Adds a repository to this container, at the end of the repository sequence.
|
org.apache.ivy.plugins.resolver.DependencyResolver |
addLast(java.lang.Object userDescription)
Deprecated.
Use
RepositoryHandler.maven(groovy.lang.Closure) or add(ArtifactRepository) instead. |
org.apache.ivy.plugins.resolver.DependencyResolver |
addLast(java.lang.Object userDescription,
Closure configureClosure)
Deprecated.
Use
RepositoryHandler.maven(groovy.lang.Closure) or add(ArtifactRepository) instead. |
ArtifactRepository |
getAt(java.lang.String name)
Locates an object by name, failing if there is no such task.
|
ArtifactRepository |
getByName(java.lang.String name)
Locates an object by name, failing if there is no such object.
|
ArtifactRepository |
getByName(java.lang.String name,
Closure configureClosure)
Locates an object by name, failing if there is no such object.
|
java.util.List<org.apache.ivy.plugins.resolver.DependencyResolver> |
getResolvers()
Returns the resolvers in this container, in sequence.
|
findAll, matching, matching, withTypeaddAll, addRule, addRule, findByName, getAsMap, getNamer, getRulesall, all, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withTypeclear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArraystatic final java.lang.String DEFAULT_MAVEN_CENTRAL_REPO_NAME
static final java.lang.String DEFAULT_MAVEN_LOCAL_REPO_NAME
static final java.lang.String MAVEN_CENTRAL_URL
static final java.lang.String MAVEN_REPO_PATTERN
static final java.lang.String DEFAULT_CACHE_ARTIFACT_PATTERN
static final java.lang.String DEFAULT_CACHE_IVY_PATTERN
static final java.lang.String INTERNAL_REPOSITORY_NAME
static final java.lang.String RESOLVER_NAME
static final java.lang.String RESOLVER_URL
boolean add(ArtifactRepository repository)
add in interface java.util.Collection<ArtifactRepository>add in interface java.util.List<ArtifactRepository>add in interface NamedDomainObjectCollection<ArtifactRepository>repository - The repository to add.true if the item was added, or false if an item with the same name already exists.void addFirst(ArtifactRepository repository)
repository - The repository to add.void addLast(ArtifactRepository repository)
repository - The repository to add.boolean add(org.apache.ivy.plugins.resolver.DependencyResolver resolver)
resolver - The repository to add, represented as an Ivy DependencyResolver.boolean add(org.apache.ivy.plugins.resolver.DependencyResolver resolver,
Closure configureClosure)
resolver - The repository to add, represented as an Ivy DependencyResolver.configureClosure - The closure to use to configure the repository.@Deprecated
org.apache.ivy.plugins.resolver.DependencyResolver addLast(java.lang.Object userDescription)
throws InvalidUserDataException
userDescription can be
one of:
DependencyResolver.ArtifactRepository.userDescription - The resolver definition.InvalidUserDataException - when a resolver with the given name already exists in this container.@Deprecated
org.apache.ivy.plugins.resolver.DependencyResolver addLast(java.lang.Object userDescription,
Closure configureClosure)
throws InvalidUserDataException
userDescription - The resolver definition. See addLast(Object) for details of this parameter.configureClosure - The closure to use to configure the resolver.InvalidUserDataException - when a resolver with the given name already exists in this container.org.apache.ivy.plugins.resolver.DependencyResolver addBefore(java.lang.Object userDescription,
java.lang.String nextResolver)
throws InvalidUserDataException
userDescription - The resolver definition. See addLast(Object) for details of this parameter.nextResolver - The existing resolver to add the new resolver before.InvalidUserDataException - when a resolver with the given name already exists in this container.UnknownRepositoryException - when the given next resolver does not exist in this container.org.apache.ivy.plugins.resolver.DependencyResolver addBefore(java.lang.Object userDescription,
java.lang.String nextResolver,
Closure configureClosure)
throws InvalidUserDataException
userDescription - The resolver definition. See addLast(Object) for details of this parameter.nextResolver - The existing resolver to add the new resolver before.configureClosure - The closure to use to configure the resolver.InvalidUserDataException - when a resolver with the given name already exists in this container.UnknownRepositoryException - when the given next resolver does not exist in this container.org.apache.ivy.plugins.resolver.DependencyResolver addAfter(java.lang.Object userDescription,
java.lang.String previousResolver)
throws InvalidUserDataException
userDescription - The resolver definition. See addLast(Object) for details of this parameter.previousResolver - The existing resolver to add the new resolver after.InvalidUserDataException - when a resolver with the given name already exists in this container.UnknownRepositoryException - when the given previous resolver does not exist in this container.org.apache.ivy.plugins.resolver.DependencyResolver addAfter(java.lang.Object userDescription,
java.lang.String previousResolver,
Closure configureClosure)
throws InvalidUserDataException
userDescription - The resolver definition. See addLast(Object) for details of this parameter.previousResolver - The existing resolver to add the new resolver after.configureClosure - The closure to use to configure the resolver.InvalidUserDataException - when a resolver with the given name already exists in this container.UnknownRepositoryException - when the given previous resolver does not exist in this container.org.apache.ivy.plugins.resolver.DependencyResolver addFirst(java.lang.Object userDescription)
throws InvalidUserDataException
userDescription - The resolver definition. See addLast(Object) for details of this parameter.InvalidUserDataException - when a resolver with the given name already exists in this container.org.apache.ivy.plugins.resolver.DependencyResolver addFirst(java.lang.Object userDescription,
Closure configureClosure)
throws InvalidUserDataException
userDescription - The resolver definition. See addLast(Object) for details of this parameter.configureClosure - The closure to use to configure the resolver.InvalidUserDataException - when a resolver with the given name already exists in this container.ArtifactRepository getByName(java.lang.String name) throws UnknownRepositoryException
getByName in interface NamedDomainObjectCollection<ArtifactRepository>name - The object nameUnknownRepositoryExceptionArtifactRepository getByName(java.lang.String name, Closure configureClosure) throws UnknownRepositoryException
getByName in interface NamedDomainObjectCollection<ArtifactRepository>name - The object nameconfigureClosure - The closure to use to configure the object.UnknownRepositoryExceptionArtifactRepository getAt(java.lang.String name) throws UnknownRepositoryException
NamedDomainObjectCollection.getByName(String). You can call this method in your build script by using the groovy [] operator.getAt in interface NamedDomainObjectCollection<ArtifactRepository>name - The object nameUnknownRepositoryExceptionjava.util.List<org.apache.ivy.plugins.resolver.DependencyResolver> getResolvers()