Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gradle.api.artifacts
Interface ResolverContainer

All Superinterfaces:
  DomainObjectCollection<org.apache.ivy.plugins.resolver.DependencyResolver>, DomainObjectContainer<org.apache.ivy.plugins.resolver.DependencyResolver>, java.lang.Iterable<org.apache.ivy.plugins.resolver.DependencyResolver>

All Known Subinterfaces:
  RepositoryHandler

    public interface ResolverContainer

extends DomainObjectContainer<org.apache.ivy.plugins.resolver.DependencyResolver>

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 java.lang.String` | `DEFAULT_CACHE_ARTIFACT_PATTERN`
`static java.lang.String` | `DEFAULT_CACHE_DIR_NAME`
`static java.lang.String` | `DEFAULT_CACHE_IVY_PATTERN`
`static java.lang.String` | `DEFAULT_CACHE_NAME`
`static java.lang.String` | `DEFAULT_MAVEN_CENTRAL_REPO_NAME`
`static java.lang.String` | `FLAT_DIR_RESOLVER_PATTERN`
`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`

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)` Locates an object by name, failing if there is no such task.
`org.apache.ivy.plugins.resolver.DependencyResolver` | `getByName(java.lang.String name)` Locates an object by name, failing if there is no such object.
`org.apache.ivy.plugins.resolver.DependencyResolver` | `getByName(java.lang.String name, groovy.lang.Closure configureClosure)` Locates an object by name, failing if there is no such object.
`java.io.File` | `getMavenPomDir()`
`Conf2ScopeMappingContainer` | `getMavenScopeMappings()`
`java.util.List<org.apache.ivy.plugins.resolver.DependencyResolver>` | `getResolvers()` Returns the resolvers in this container, in sequence.
`void` | `setMavenPomDir(java.io.File mavenPomDir)`

Methods inherited from interface org.gradle.api.DomainObjectContainer
`addRule, getRules`

Methods inherited from interface org.gradle.api.DomainObjectCollection
`allObjects, allObjects, findAll, findByName, getAll, getAsMap, matching, whenObjectAdded, whenObjectAdded, whenObjectRemoved, withType`

Methods inherited from interface java.lang.Iterable
`iterator`

Field Detail

### DEFAULT_MAVEN_CENTRAL_REPO_NAME

    static final java.lang.String DEFAULT_MAVEN_CENTRAL_REPO_NAME

See Also:
  Constant Field Values

### MAVEN_CENTRAL_URL

    static final java.lang.String MAVEN_CENTRAL_URL

See Also:
  Constant Field Values

### MAVEN_REPO_PATTERN

    static final java.lang.String MAVEN_REPO_PATTERN

See Also:
  Constant Field Values

### FLAT_DIR_RESOLVER_PATTERN

    static final java.lang.String FLAT_DIR_RESOLVER_PATTERN

See Also:
  Constant Field Values

### DEFAULT_CACHE_ARTIFACT_PATTERN

    static final java.lang.String DEFAULT_CACHE_ARTIFACT_PATTERN

See Also:
  Constant Field Values

### DEFAULT_CACHE_IVY_PATTERN

    static final java.lang.String DEFAULT_CACHE_IVY_PATTERN

See Also:
  Constant Field Values

### DEFAULT_CACHE_NAME

    static final java.lang.String DEFAULT_CACHE_NAME

See Also:
  Constant Field Values

### INTERNAL_REPOSITORY_NAME

    static final java.lang.String INTERNAL_REPOSITORY_NAME

See Also:
  Constant Field Values

### DEFAULT_CACHE_DIR_NAME

    static final java.lang.String DEFAULT_CACHE_DIR_NAME

See Also:
  Constant Field Values

### RESOLVER_NAME

    static final java.lang.String RESOLVER_NAME

See Also:
  Constant Field Values

### RESOLVER_URL

    static final java.lang.String RESOLVER_URL

See Also:
  Constant Field Values

Method Detail

### add

    org.apache.ivy.plugins.resolver.DependencyResolver add(java.lang.Object userDescription)
                                                           throws InvalidUserDataException

  Adds a resolver to this container, at the end of the resolver sequence. The given `userDescription` can be one of:
  - A String. This is treated as a URL, and used to create a maven resolver.
  - A map. This is used to create a maven resolver. The map must contain an "name" entry and a "url" entry.
  - A `DependencyResolver`.

  Parameters:
    `userDescription` - The resolver definition.
  Returns:
    The added resolver.
  Throws:
    `InvalidUserDataException` - when a resolver with the given name already exists in this container.

### add

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

  Adds a resolver to this container, at the end of the resolver sequence. The resolver is configured using the given configure closure.

  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.
  Throws:
    `InvalidUserDataException` - when a resolver with the given name already exists in this container.

### addBefore

    org.apache.ivy.plugins.resolver.DependencyResolver addBefore(java.lang.Object userDescription,
                                                                 java.lang.String nextResolver)
                                                                 throws InvalidUserDataException

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

  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.
  Throws:
    `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.

### addBefore

    org.apache.ivy.plugins.resolver.DependencyResolver addBefore(java.lang.Object userDescription,
                                                                 java.lang.String nextResolver,
                                                                 groovy.lang.Closure configureClosure)
                                                                 throws InvalidUserDataException

  Adds a resolver to this container, before the given resolver. The resolver is configured using the given configure closure.

  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.
  Throws:
    `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.

### addAfter

    org.apache.ivy.plugins.resolver.DependencyResolver addAfter(java.lang.Object userDescription,
                                                                java.lang.String previousResolver)
                                                                throws InvalidUserDataException

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

  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.
  Throws:
    `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.

### addAfter

    org.apache.ivy.plugins.resolver.DependencyResolver addAfter(java.lang.Object userDescription,
                                                                java.lang.String previousResolver,
                                                                groovy.lang.Closure configureClosure)
                                                                throws InvalidUserDataException

  Adds a resolver to this container, after the given resolver. The resolver is configured using the given configure closure.

  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.
  Throws:
    `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.

### addFirst

    org.apache.ivy.plugins.resolver.DependencyResolver addFirst(java.lang.Object userDescription)
                                                                throws InvalidUserDataException

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

  Parameters:
    `userDescription` - The resolver definition. See `add(Object)` for details of this parameter.
  Returns:
    The added resolver.
  Throws:
    `InvalidUserDataException` - when a resolver with the given name already exists in this container.

### addFirst

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

  Adds a resolver to this container, at the start of the resolver sequence. The resolver is configured using the given configure closure.

  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.
  Throws:
    `InvalidUserDataException` - when a resolver with the given name already exists in this container.

### getByName

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

  Locates an object by name, failing if there is no such object.

  Specified by:
    `getByName` in interface `DomainObjectCollection<org.apache.ivy.plugins.resolver.DependencyResolver>`
  Parameters:
    `name` - The object name
  Returns:
    The object with the given name. Never returns null.
  Throws:
    `UnknownRepositoryException`

### getByName

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

  Locates an object by name, failing if there is no such object. The given configure closure is executed against the object before it is returned from this method. The object is passed to the closure as it's delegate.

  Specified by:
    `getByName` in interface `DomainObjectCollection<org.apache.ivy.plugins.resolver.DependencyResolver>`
  Parameters:
    `name` - The object name
    `configureClosure` - The closure to use to configure the object.
  Returns:
    The object with the given name, after the configure closure has been applied to it. Never returns null.
  Throws:
    `UnknownRepositoryException`

### getAt

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

  Locates an object by name, failing if there is no such task. This method is identical to `DomainObjectCollection.getByName(String)`. You can call this method in your build script by using the groovy `[]` operator.

  Specified by:
    `getAt` in interface `DomainObjectCollection<org.apache.ivy.plugins.resolver.DependencyResolver>`
  Parameters:
    `name` - The object name
  Returns:
    The object with the given name. Never returns null.
  Throws:
    `UnknownRepositoryException`

### getResolvers

    java.util.List<org.apache.ivy.plugins.resolver.DependencyResolver> getResolvers()

  Returns the resolvers in this container, in sequence.

  Returns:
    The resolvers in sequence. Returns an empty list if this container is empty.

### setMavenPomDir

    void setMavenPomDir(java.io.File mavenPomDir)

### getMavenScopeMappings

    Conf2ScopeMappingContainer getMavenScopeMappings()

### getMavenPomDir

    java.io.File getMavenPomDir()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD