public class DefaultIvyArtifactRepository extends Object implements IvyArtifactRepository, ArtifactRepositoryInternal
GRADLE_ARTIFACT_PATTERN, GRADLE_IVY_PATTERN, MAVEN_ARTIFACT_PATTERN, MAVEN_IVY_PATTERN| Constructor and Description |
|---|
DefaultIvyArtifactRepository(FileResolver fileResolver,
PasswordCredentials credentials,
RepositoryTransportFactory transportFactory,
LocallyAvailableResourceFinder<org.apache.ivy.core.module.id.ArtifactRevisionId> locallyAvailableResourceFinder,
CachedExternalResourceIndex<String> cachedExternalResourceIndex) |
| Modifier and Type | Method and Description |
|---|---|
void |
artifactPattern(String pattern)
Adds an Ivy artifact pattern to use to locate artifacts in this repository.
|
org.apache.ivy.plugins.resolver.DependencyResolver |
createResolver() |
void |
credentials(Closure closure)
Configure the Credentials for this repository using the supplied Closure.
|
PasswordCredentials |
getCredentials()
Provides the Credentials used to authenticate to this repository.
|
String |
getName()
Returns the name for this repository.
|
URI |
getUrl()
The base URL of this repository.
|
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 |
setName(String name)
Sets the name for this repository.
|
void |
setUrl(Object url)
Sets the base URL of this repository.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcredentials, getCredentialspublic DefaultIvyArtifactRepository(FileResolver fileResolver, PasswordCredentials credentials, RepositoryTransportFactory transportFactory, LocallyAvailableResourceFinder<org.apache.ivy.core.module.id.ArtifactRevisionId> locallyAvailableResourceFinder, CachedExternalResourceIndex<String> cachedExternalResourceIndex)
public org.apache.ivy.plugins.resolver.DependencyResolver createResolver()
createResolver in interface ArtifactRepositoryInternalpublic String getName()
ArtifactRepositoryThe name is used in logging output and error reporting to point to information related to this repository.
getName in interface ArtifactRepositorypublic void setName(String name)
ArtifactRepositorysetName in interface ArtifactRepositoryname - The name. Must not be null.public URI getUrl()
IvyArtifactRepositorygetUrl in interface IvyArtifactRepositorypublic void setUrl(Object url)
IvyArtifactRepositoryProject.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 IvyArtifactRepository.layout(String, Closure) for this repository.setUrl in interface IvyArtifactRepositoryurl - The base URL.public void artifactPattern(String pattern)
IvyArtifactRepositoryIvyArtifactRepository.setUrl(java.lang.Object).artifactPattern in interface IvyArtifactRepositorypattern - The artifact pattern.public void ivyPattern(String pattern)
IvyArtifactRepositoryIvyArtifactRepository.setUrl(java.lang.Object).ivyPattern in interface IvyArtifactRepositorypattern - The ivy pattern.public void layout(String layoutName)
IvyArtifactRepositoryIvyArtifactRepository.layout(String, Closure).layout in interface IvyArtifactRepositorylayoutName - The name of the layout to use.public void layout(String layoutName, Closure config)
IvyArtifactRepository$baseUri/"[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier])(.[ext])"$baseUri/"[organisation]/[module]/[revision]/ivy-[revision].xml"$baseUri/"[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier])(.[ext])"$baseUri/"[organisation]/[module]/[revision]/ivy-[revision].xml"
repositories {
ivy {
layout 'pattern' , {
artifact '[module]/[revision]/[artifact](.[ext])'
ivy '[module]/[revision]/ivy.xml'
}
}
}
layout in interface IvyArtifactRepositorylayoutName - The name of the layout to use.config - The closure used to configure the layout.public PasswordCredentials getCredentials()
AuthenticationSupportedgetCredentials in interface AuthenticationSupportedpublic void credentials(Closure closure)
AuthenticationSupported
repositories {
maven {
credentials {
username = 'joe'
password = 'secret'
}
}
}
credentials in interface AuthenticationSupportedCopyright © 2013. All rights reserved