public interface IvyArtifactRepository extends ArtifactRepository, AuthenticationSupported
When used to resolve metadata and artifact files, all available patterns will be searched.
When used to upload metadata and artifact files, only a single, primary pattern will be used:
setUrl(java.lang.Object) then that URL will be used for upload, combined with the applied layout(String).artifactPattern(java.lang.String) or ivyPattern(java.lang.String), then the first defined pattern will be used.
Repositories of this type are created by the RepositoryHandler.ivy(org.gradle.api.Action) group of methods.
| Modifier and Type | Field and Description |
|---|---|
static String |
GRADLE_ARTIFACT_PATTERN |
static String |
GRADLE_IVY_PATTERN |
static String |
IVY_ARTIFACT_PATTERN |
static String |
MAVEN_ARTIFACT_PATTERN |
static String |
MAVEN_IVY_PATTERN |
| Modifier and Type | Method and Description |
|---|---|
void |
artifactPattern(String pattern)
Adds an independent pattern that will be used to locate artifact files in this repository.
|
IvyArtifactRepositoryMetaDataProvider |
getResolve()
Returns the meta-data provider used when resolving artifacts from this repository.
|
URI |
getUrl()
The base URL of this repository.
|
void |
ivyPattern(String pattern)
Adds an independent pattern that will be used 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,
Action<? extends RepositoryLayout> config)
Specifies how the items of the repository are organized.
|
void |
layout(String layoutName,
Closure config)
Specifies how the items of the repository are organized.
|
void |
setUrl(Object url)
Sets the base URL of this repository.
|
getName, setNameauthentication, credentials, credentials, getAuthentication, getCredentials, getCredentialsstatic final String IVY_ARTIFACT_PATTERN
static final String GRADLE_ARTIFACT_PATTERN
static final String GRADLE_IVY_PATTERN
static final String MAVEN_ARTIFACT_PATTERN
static final String MAVEN_IVY_PATTERN
URI getUrl()
void setUrl(Object url)
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.url - The base URL.void artifactPattern(String pattern)
ivyPattern(String).
If this pattern is not a fully-qualified URL, it will be interpreted as a file relative to the project directory.
It is not interpreted relative the URL specified in setUrl(Object).
Patterns added in this way will be in addition to any layout-based patterns added via setUrl(java.lang.Object).pattern - The artifact pattern.void ivyPattern(String pattern)
setUrl(Object).
Patterns added in this way will be in addition to any layout-based patterns added via setUrl(java.lang.Object).pattern - The ivy pattern.void layout(String layoutName)
layout(String, Closure).layoutName - The name of the layout to use.void layout(String layoutName, Action<? extends RepositoryLayout> config)
The layout is configured with the supplied closure.
Recognised values are as follows:
A Repository Layout that applies the following patterns:
$baseUri/"[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier])(.[ext])"$baseUri/"[organisation]/[module]/[revision]/ivy-[revision].xml"A Repository Layout that applies the following patterns:
$baseUri/"[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier])(.[ext])"$baseUri/"[organisation]/[module]/[revision]/ivy-[revision].xml"Following the Maven convention, the 'organisation' value is further processed by replacing '.' with '/'.
A Repository Layout that applies the following patterns:
$baseUri/"[organisation]/[module]/[revision]/[type]s/[artifact](.[ext])"$baseUri/"[organisation]/[module]/[revision]/[type]s/[artifact](.[ext])"Note: this pattern is currently incubating.
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'
}
}
}
The available pattern tokens are listed as part of Ivy's Main Concepts documentation.
layoutName - The name of the layout to use.config - The action used to configure the layout.void layout(String layoutName, Closure config)
layout(String, org.gradle.api.Action)layoutName - The name of the layout to use.config - The closure used to configure the layout.
An instance of RepositoryLayout is passed as a parameter to the closure.@Incubating IvyArtifactRepositoryMetaDataProvider getResolve()