Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

## org.gradle.api.artifacts.repositories
[Java] Interface IvyArtifactRepository

    org.gradle.api.artifacts.repositories.ArtifactRepository
      org.gradle.api.artifacts.repositories.IvyArtifactRepository

All Superinterfaces:
  ArtifactRepository

    public interface IvyArtifactRepository
    extends ArtifactRepository

An artifact repository which uses an Ivy format to store artifacts and meta-data.

Field Summary
`java.lang.String` | `GRADLE_ARTIFACT_PATTERN`
`java.lang.String` | `GRADLE_IVY_PATTERN`
`java.lang.String` | `MAVEN_ARTIFACT_PATTERN`
`java.lang.String` | `MAVEN_IVY_PATTERN`

Method Summary
`void` | `artifactPattern(java.lang.String pattern)` Adds an Ivy artifact pattern to use to locate artifacts in this repository.
`java.lang.String` | `getPassword()` Returns the password to use when authenticating to this repository.
`java.net.URI` | `getUrl()` The base URL of this repository.
`java.lang.String` | `getUserName()` Returns the user name to use when authenticating to this repository.
`void` | `ivyPattern(java.lang.String pattern)` Adds an Ivy pattern to use to locate ivy files in this repository.
`void` | `layout(java.lang.String layoutName)` Specifies the layout to use with this repository, based on the root url.
`void` | `layout(java.lang.String layoutName, groovy.lang.Closure config)` Specifies the layout to use with this repository, based on the root url.
`void` | `setPassword(java.lang.String password)` Sets the password to use when authenticating to this repository.
`void` | `setUrl(java.lang.Object url)` Sets the base URL of this repository.
`void` | `setUserName(java.lang.String username)` Sets the user name to use when authenticating to this repository.

Methods inherited from interface ArtifactRepository
getName, setName

Field Detail

### GRADLE_ARTIFACT_PATTERN

    public java.lang.String GRADLE_ARTIFACT_PATTERN

### GRADLE_IVY_PATTERN

    public java.lang.String GRADLE_IVY_PATTERN

### MAVEN_ARTIFACT_PATTERN

    public java.lang.String MAVEN_ARTIFACT_PATTERN

### MAVEN_IVY_PATTERN

    public java.lang.String MAVEN_IVY_PATTERN

Method Detail

### artifactPattern

    public void artifactPattern(java.lang.String pattern)

  Adds an Ivy artifact pattern to use to locate artifacts in this repository. This pattern will be in addition to any layout-based patterns added via setUrl.
  Parameters:
    `pattern` - The artifact pattern.

### getPassword

    public java.lang.String getPassword()

  Returns the password to use when authenticating to this repository.
  Returns:
    The password. May be null.

### getUrl

    public java.net.URI getUrl()

  The base URL of this repository.
  Returns:
    The URL.

### getUserName

    public java.lang.String getUserName()

  Returns the user name to use when authenticating to this repository.
  Returns:
    The user name. May be null.

### ivyPattern

    public void ivyPattern(java.lang.String pattern)

  Adds an Ivy pattern to use to locate ivy files in this repository. This pattern will be in addition to any layout-based patterns added via setUrl.
  Parameters:
    `pattern` - The ivy pattern.

### layout

    public void layout(java.lang.String layoutName)

  Specifies the layout to use with this repository, based on the root url. See layout(String, Closure).
  Parameters:
    `layoutName` - The name of the layout to use.

### layout

    public void layout(java.lang.String layoutName, groovy.lang.Closure config)

  Specifies the layout to use with this repository, based on the root url. The returned layout is configured with the supplied closure. Available layouts are outlined below.

  #### 'gradle'

  A Repository Layout that applies the following patterns:
  - Artifacts: `$baseUri/{
    value:
      #GRADLE_ARTIFACT_PATTERN}
    `
  - Ivy: `$baseUri/{@value #GRADLE_IVY_PATTERN}`

  #### 'maven'

  A Repository Layout that applies the following patterns:
  - Artifacts: `$baseUri/{@value #MAVEN_ARTIFACT_PATTERN}`
  - Ivy: `$baseUri/{@value #MAVEN_IVY_PATTERN}`
  Following the maven convention, the 'organisation' value is further processed by replacing '.' with '/'.

  #### 'pattern'

  A repository layout that allows custom patterns to be defined. eg:

           layout 'pattern' , {
               artifacts '[module]/[revision]/[artifact](.[ext])'
               ivy '[module]/[revision]/ivy.xml'
           }

Parameters:
  `layoutName` - The name of the layout to use.
  `config` - The closure used to configure the layout.

### setPassword

    public void setPassword(java.lang.String password)

  Sets the password to use when authenticating to this repository.
  Parameters:
    `password` - The password. May be null.

### setUrl

    public void setUrl(java.lang.Object url)

  Sets the base URL of this repository. The provided value is evaluated as for Project.uri. This means, for example, you can pass in a File object or a relative path which is evaluated relative to the project directory. File are resolved based on the supplied URL and the configured layout(String, Closure) for this repository.
  Parameters:
    `url` - The base URL.

### setUserName

    public void setUserName(java.lang.String username)

  Sets the user name to use when authenticating to this repository.
  Parameters:
    `username` - The user name. May be null.

Groovy Documentation