org.gradle.api.artifacts.repositories
Interface IvyArtifactRepository

All Superinterfaces:
ArtifactRepository, AuthenticationSupported

public interface IvyArtifactRepository
extends ArtifactRepository, AuthenticationSupported

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


Field Summary
static String GRADLE_ARTIFACT_PATTERN
           
static String GRADLE_IVY_PATTERN
           
static String MAVEN_ARTIFACT_PATTERN
           
static String MAVEN_IVY_PATTERN
           
 
Method Summary
 void artifactPattern(String pattern)
          Adds an Ivy artifact pattern to use to locate artifacts in this repository.
 String getPassword()
          Deprecated. Use AuthenticationSupported.getCredentials() and PasswordCredentials.getPassword() instead.
 URI getUrl()
          The base URL of this repository.
 String getUserName()
          Deprecated. Use AuthenticationSupported.getCredentials() and PasswordCredentials.getUsername() instead.
 void ivyPattern(String pattern)
          Adds an Ivy pattern to use to locate ivy files in this repository.
 void layout(String layoutName)
          Specifies the layout to use with this repository, based on the root url.
 void layout(String layoutName, Closure config)
          Specifies the layout to use with this repository, based on the root url.
 void setPassword(String password)
          Deprecated. Use AuthenticationSupported.getCredentials() and PasswordCredentials.setPassword(String) instead.
 void setUrl(Object url)
          Sets the base URL of this repository.
 void setUserName(String username)
          Deprecated. Use AuthenticationSupported.getCredentials() and PasswordCredentials.setUsername(String) instead.
 
Methods inherited from interface org.gradle.api.artifacts.repositories.ArtifactRepository
getName, setName
 
Methods inherited from interface org.gradle.api.artifacts.repositories.AuthenticationSupported
credentials, getCredentials
 

Field Detail

GRADLE_ARTIFACT_PATTERN

static final String GRADLE_ARTIFACT_PATTERN
See Also:
Constant Field Values

GRADLE_IVY_PATTERN

static final String GRADLE_IVY_PATTERN
See Also:
Constant Field Values

MAVEN_ARTIFACT_PATTERN

static final String MAVEN_ARTIFACT_PATTERN
See Also:
Constant Field Values

MAVEN_IVY_PATTERN

static final String MAVEN_IVY_PATTERN
See Also:
Constant Field Values
Method Detail

getUrl

URI getUrl()
The base URL of this repository.

Returns:
The URL.

setUrl

void setUrl(Object url)
Sets the base URL of this repository. The provided value is evaluated as for Project.uri(Object). 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.

artifactPattern

void artifactPattern(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(java.lang.Object).

Parameters:
pattern - The artifact pattern.

ivyPattern

void ivyPattern(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(java.lang.Object).

Parameters:
pattern - The ivy pattern.

layout

void layout(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

void layout(String layoutName,
            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:

'maven'

A Repository Layout that applies the following patterns: 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:
 repositories {
     ivy {
         layout 'pattern' , {
             artifact '[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.

getUserName

@Deprecated
String getUserName()
Deprecated. Use AuthenticationSupported.getCredentials() and PasswordCredentials.getUsername() instead.

Returns the username to use for authentication with this repository, if any.

Returns:
the username, may be null.

setUserName

@Deprecated
void setUserName(String username)
Deprecated. Use AuthenticationSupported.getCredentials() and PasswordCredentials.setUsername(String) instead.

Sets the username to use for authentication with this repository, if any.

Parameters:
username - the username, may be null.

getPassword

@Deprecated
String getPassword()
Deprecated. Use AuthenticationSupported.getCredentials() and PasswordCredentials.getPassword() instead.

Returns the password to use for authentication with this repository, if any.

Returns:
the password, may be null.

setPassword

@Deprecated
void setPassword(String password)
Deprecated. Use AuthenticationSupported.getCredentials() and PasswordCredentials.setPassword(String) instead.

Sets the password to use for authentication with this repository, if any.

Parameters:
password - the password, may be null.