Groovy Documentation

org.gradle.api.artifacts
[Java] Interface ResolverContainer

org.gradle.api.NamedDomainObjectCollection
  org.gradle.api.DomainObjectCollection
      org.gradle.api.artifacts.ResolverContainer
          org.gradle.api.NamedDomainObjectContainer
All Superinterfaces:
DomainObjectCollection, NamedDomainObjectCollection, NamedDomainObjectContainer

public interface ResolverContainer
extends NamedDomainObjectCollection, NamedDomainObjectContainer

A ResolverContainer is responsible for managing a set of org.apache.ivy.plugins.resolver.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)
 }
 
Authors:
Hans Dockter


Field Summary
java.lang.String DEFAULT_CACHE_ARTIFACT_PATTERN

java.lang.String DEFAULT_CACHE_DIR_NAME

java.lang.String DEFAULT_CACHE_IVY_PATTERN

java.lang.String DEFAULT_MAVEN_CENTRAL_REPO_NAME

java.lang.String DEFAULT_MAVEN_LOCAL_REPO_NAME

java.lang.String INTERNAL_REPOSITORY_NAME

java.lang.String MAVEN_CENTRAL_URL

java.lang.String MAVEN_REPO_PATTERN

java.lang.String RESOLVER_NAME

java.lang.String RESOLVER_URL

 
Method Summary
org.apache.ivy.plugins.resolver.DependencyResolver add(java.lang.Object userDescription)

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

org.apache.ivy.plugins.resolver.DependencyResolver add(java.lang.Object userDescription, groovy.lang.Closure configureClosure)

Adds a resolver to this container, at the end of the resolver 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, groovy.lang.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, groovy.lang.Closure configureClosure)

Adds a resolver to this container, before the given resolver.

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, groovy.lang.Closure configureClosure)

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

org.apache.ivy.plugins.resolver.DependencyResolver getAt(java.lang.String name)

{@inheritDoc}

org.apache.ivy.plugins.resolver.DependencyResolver getByName(java.lang.String name)

{@inheritDoc}

org.apache.ivy.plugins.resolver.DependencyResolver getByName(java.lang.String name, groovy.lang.Closure configureClosure)

{@inheritDoc}

java.io.File getMavenPomDir()

Conf2ScopeMappingContainer getMavenScopeMappings()

java.util.List getResolvers()

Returns the resolvers in this container, in sequence.

void setMavenPomDir(java.io.File mavenPomDir)

 
Methods inherited from interface NamedDomainObjectCollection
findByName, getAsMap, getAt, getByName, getByName, matching, matching, withType
 
Methods inherited from interface NamedDomainObjectContainer
addRule, addRule, getRules
 
Methods inherited from interface NamedDomainObjectCollection
findByName, getAsMap, getAt, getByName, getByName, matching, matching, withType
 

Field Detail

DEFAULT_CACHE_ARTIFACT_PATTERN

public java.lang.String DEFAULT_CACHE_ARTIFACT_PATTERN


DEFAULT_CACHE_DIR_NAME

public java.lang.String DEFAULT_CACHE_DIR_NAME


DEFAULT_CACHE_IVY_PATTERN

public java.lang.String DEFAULT_CACHE_IVY_PATTERN


DEFAULT_MAVEN_CENTRAL_REPO_NAME

public java.lang.String DEFAULT_MAVEN_CENTRAL_REPO_NAME


DEFAULT_MAVEN_LOCAL_REPO_NAME

public java.lang.String DEFAULT_MAVEN_LOCAL_REPO_NAME


INTERNAL_REPOSITORY_NAME

public java.lang.String INTERNAL_REPOSITORY_NAME


MAVEN_CENTRAL_URL

public java.lang.String MAVEN_CENTRAL_URL


MAVEN_REPO_PATTERN

public java.lang.String MAVEN_REPO_PATTERN


RESOLVER_NAME

public java.lang.String RESOLVER_NAME


RESOLVER_URL

public java.lang.String RESOLVER_URL


 
Method Detail

add

public org.apache.ivy.plugins.resolver.DependencyResolver add(java.lang.Object userDescription)
Adds a resolver to this container, at the end of the resolver sequence. The given userDescription can be one of:
throws:
InvalidUserDataException when a resolver with the given name already exists in this container.
Parameters:
userDescription - The resolver definition.
Returns:
The added resolver.


add

public org.apache.ivy.plugins.resolver.DependencyResolver add(java.lang.Object userDescription, groovy.lang.Closure configureClosure)
Adds a resolver to this container, at the end of the resolver sequence. The resolver is configured using the given configure closure.
throws:
InvalidUserDataException when a resolver with the given name already exists in this container.
Parameters:
userDescription - The resolver definition. See add(Object) for details of this parameter.
configureClosure - The closure to use to configure the resolver.
Returns:
The added resolver.


addAfter

public 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.
throws:
InvalidUserDataException when a resolver with the given name already exists in this container.
throws:
InvalidUserDataException when the given previous resolver does not exist in this container.
Parameters:
userDescription - The resolver definition. See add(Object) for details of this parameter.
previousResolver - The existing resolver to add the new resolver after.
Returns:
The added resolver.


addAfter

public org.apache.ivy.plugins.resolver.DependencyResolver addAfter(java.lang.Object userDescription, java.lang.String previousResolver, groovy.lang.Closure configureClosure)
Adds a resolver to this container, after the given resolver. The resolver is configured using the given configure closure.
throws:
InvalidUserDataException when a resolver with the given name already exists in this container.
throws:
InvalidUserDataException when the given previous resolver does not exist in this container.
Parameters:
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.
Returns:
The added resolver.


addBefore

public 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.
throws:
InvalidUserDataException when a resolver with the given name already exists in this container.
throws:
InvalidUserDataException when the given next resolver does not exist in this container.
Parameters:
userDescription - The resolver definition. See add(Object) for details of this parameter.
nextResolver - The existing resolver to add the new resolver before.
Returns:
The added resolver.


addBefore

public org.apache.ivy.plugins.resolver.DependencyResolver addBefore(java.lang.Object userDescription, java.lang.String nextResolver, groovy.lang.Closure configureClosure)
Adds a resolver to this container, before the given resolver. The resolver is configured using the given configure closure.
throws:
InvalidUserDataException when a resolver with the given name already exists in this container.
throws:
InvalidUserDataException when the given next resolver does not exist in this container.
Parameters:
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.
Returns:
The added resolver.


addFirst

public org.apache.ivy.plugins.resolver.DependencyResolver addFirst(java.lang.Object userDescription)
Adds a resolver to this container, at the start of the resolver sequence.
throws:
InvalidUserDataException when a resolver with the given name already exists in this container.
Parameters:
userDescription - The resolver definition. See add(Object) for details of this parameter.
Returns:
The added resolver.


addFirst

public org.apache.ivy.plugins.resolver.DependencyResolver addFirst(java.lang.Object userDescription, groovy.lang.Closure configureClosure)
Adds a resolver to this container, at the start of the resolver sequence. The resolver is configured using the given configure closure.
throws:
InvalidUserDataException when a resolver with the given name already exists in this container.
Parameters:
userDescription - The resolver definition. See add(Object) for details of this parameter.
configureClosure - The closure to use to configure the resolver.
Returns:
The added resolver.


getAt

public org.apache.ivy.plugins.resolver.DependencyResolver getAt(java.lang.String name)
{@inheritDoc}


getByName

public org.apache.ivy.plugins.resolver.DependencyResolver getByName(java.lang.String name)
{@inheritDoc}


getByName

public org.apache.ivy.plugins.resolver.DependencyResolver getByName(java.lang.String name, groovy.lang.Closure configureClosure)
{@inheritDoc}


getMavenPomDir

public java.io.File getMavenPomDir()


getMavenScopeMappings

public Conf2ScopeMappingContainer getMavenScopeMappings()


getResolvers

public java.util.List getResolvers()
Returns the resolvers in this container, in sequence.
Returns:
The resolvers in sequence. Returns an empty list if this container is empty.


setMavenPomDir

public void setMavenPomDir(java.io.File mavenPomDir)


 

Groovy Documentation