|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ResolverContainer
A ResolverContainer is responsible for managing a set of DependencyResolver
instances. Resolvers 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 accessable as read-only properties of the container, using the name of the resolver as the property name. For example:
resolvers.add('myResolver')
resolvers.myResolver.addArtifactPattern(somePattern)
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.add('myResolver')
resolvers.myResolver {
addArtifactPattern(somePattern)
}
| Field Summary | |
|---|---|
static String |
DEFAULT_CACHE_ARTIFACT_PATTERN
|
static String |
DEFAULT_CACHE_DIR_NAME
|
static String |
DEFAULT_CACHE_IVY_PATTERN
|
static String |
DEFAULT_MAVEN_CENTRAL_REPO_NAME
|
static String |
DEFAULT_MAVEN_LOCAL_REPO_NAME
|
static String |
INTERNAL_REPOSITORY_NAME
|
static String |
MAVEN_CENTRAL_URL
|
static String |
MAVEN_REPO_PATTERN
|
static String |
RESOLVER_NAME
|
static String |
RESOLVER_URL
|
| Method Summary | |
|---|---|
org.apache.ivy.plugins.resolver.DependencyResolver |
add(Object userDescription)
Adds a resolver to this container, at the end of the resolver sequence. |
org.apache.ivy.plugins.resolver.DependencyResolver |
add(Object userDescription,
Closure configureClosure)
Adds a resolver to this container, at the end of the resolver sequence. |
org.apache.ivy.plugins.resolver.DependencyResolver |
addAfter(Object userDescription,
String previousResolver)
Adds a resolver to this container, after the given resolver. |
org.apache.ivy.plugins.resolver.DependencyResolver |
addAfter(Object userDescription,
String previousResolver,
Closure configureClosure)
Adds a resolver to this container, after the given resolver. |
org.apache.ivy.plugins.resolver.DependencyResolver |
addBefore(Object userDescription,
String nextResolver)
Adds a resolver to this container, before the given resolver. |
org.apache.ivy.plugins.resolver.DependencyResolver |
addBefore(Object userDescription,
String nextResolver,
Closure configureClosure)
Adds a resolver to this container, before the given resolver. |
org.apache.ivy.plugins.resolver.DependencyResolver |
addFirst(Object userDescription)
Adds a resolver to this container, at the start of the resolver sequence. |
org.apache.ivy.plugins.resolver.DependencyResolver |
addFirst(Object userDescription,
Closure configureClosure)
Adds a resolver to this container, at the start of the resolver sequence. |
org.apache.ivy.plugins.resolver.DependencyResolver |
getAt(String name)
Locates an object by name, failing if there is no such task. |
org.apache.ivy.plugins.resolver.DependencyResolver |
getByName(String name)
Locates an object by name, failing if there is no such object. |
org.apache.ivy.plugins.resolver.DependencyResolver |
getByName(String name,
Closure configureClosure)
Locates an object by name, failing if there is no such object. |
File |
getMavenPomDir()
|
Conf2ScopeMappingContainer |
getMavenScopeMappings()
|
List<org.apache.ivy.plugins.resolver.DependencyResolver> |
getResolvers()
Returns the resolvers in this container, in sequence. |
void |
setMavenPomDir(File mavenPomDir)
|
| Methods inherited from interface org.gradle.api.NamedDomainObjectContainer |
|---|
addRule, addRule, getRules |
| Methods inherited from interface org.gradle.api.NamedDomainObjectCollection |
|---|
findByName, getAsMap, matching, matching, withType |
| Methods inherited from interface org.gradle.api.DomainObjectCollection |
|---|
all, all, allObjects, allObjects, findAll, getAll, whenObjectAdded, whenObjectAdded, whenObjectRemoved, withType, withType |
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| Field Detail |
|---|
static final String DEFAULT_MAVEN_CENTRAL_REPO_NAME
static final String DEFAULT_MAVEN_LOCAL_REPO_NAME
static final String MAVEN_CENTRAL_URL
static final String MAVEN_REPO_PATTERN
static final String DEFAULT_CACHE_ARTIFACT_PATTERN
static final String DEFAULT_CACHE_IVY_PATTERN
static final String INTERNAL_REPOSITORY_NAME
static final String DEFAULT_CACHE_DIR_NAME
static final String RESOLVER_NAME
static final String RESOLVER_URL
| Method Detail |
|---|
org.apache.ivy.plugins.resolver.DependencyResolver add(Object userDescription)
throws InvalidUserDataException
userDescription can be
one of:
DependencyResolver.
userDescription - The resolver definition.
InvalidUserDataException - when a resolver with the given name already exists in this container.
org.apache.ivy.plugins.resolver.DependencyResolver add(Object userDescription,
Closure configureClosure)
throws InvalidUserDataException
userDescription - The resolver definition. See add(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(Object userDescription,
String nextResolver)
throws InvalidUserDataException
userDescription - The resolver definition. See add(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.
InvalidUserDataException - when the given next resolver does not exist in this container.
org.apache.ivy.plugins.resolver.DependencyResolver addBefore(Object userDescription,
String nextResolver,
Closure configureClosure)
throws InvalidUserDataException
userDescription - The resolver definition. See add(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.
InvalidUserDataException - when the given next resolver does not exist in this container.
org.apache.ivy.plugins.resolver.DependencyResolver addAfter(Object userDescription,
String previousResolver)
throws InvalidUserDataException
userDescription - The resolver definition. See add(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.
InvalidUserDataException - when the given previous resolver does not exist in this container.
org.apache.ivy.plugins.resolver.DependencyResolver addAfter(Object userDescription,
String previousResolver,
Closure configureClosure)
throws InvalidUserDataException
userDescription - The resolver definition. See add(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.
InvalidUserDataException - when the given previous resolver does not exist in this container.
org.apache.ivy.plugins.resolver.DependencyResolver addFirst(Object userDescription)
throws InvalidUserDataException
userDescription - The resolver definition. See add(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(Object userDescription,
Closure configureClosure)
throws InvalidUserDataException
userDescription - The resolver definition. See add(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 getByName(String name)
throws UnknownRepositoryException
getByName in interface NamedDomainObjectCollection<org.apache.ivy.plugins.resolver.DependencyResolver>name - The object name
UnknownRepositoryException
org.apache.ivy.plugins.resolver.DependencyResolver getByName(String name,
Closure configureClosure)
throws UnknownRepositoryException
getByName in interface NamedDomainObjectCollection<org.apache.ivy.plugins.resolver.DependencyResolver>name - The object nameconfigureClosure - The closure to use to configure the object.
UnknownRepositoryException
org.apache.ivy.plugins.resolver.DependencyResolver getAt(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<org.apache.ivy.plugins.resolver.DependencyResolver>name - The object name
UnknownRepositoryExceptionList<org.apache.ivy.plugins.resolver.DependencyResolver> getResolvers()
void setMavenPomDir(File mavenPomDir)
Conf2ScopeMappingContainer getMavenScopeMappings()
File getMavenPomDir()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||