|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RepositoryHandler
A RepositoryHandler
manages a set of repositories, allowing repositories to be defined and queried.
Field Summary | |
---|---|
static String |
DEFAULT_MAVEN_DEPLOYER_NAME
|
static String |
DEFAULT_MAVEN_INSTALLER_NAME
|
Fields inherited from interface org.gradle.api.artifacts.ResolverContainer |
---|
DEFAULT_CACHE_ARTIFACT_PATTERN, DEFAULT_CACHE_DIR_NAME, DEFAULT_CACHE_IVY_PATTERN, DEFAULT_MAVEN_CENTRAL_REPO_NAME, DEFAULT_MAVEN_LOCAL_REPO_NAME, FLAT_DIR_RESOLVER_PATTERN, INTERNAL_REPOSITORY_NAME, MAVEN_CENTRAL_URL, MAVEN_REPO_PATTERN, RESOLVER_NAME, RESOLVER_URL |
Method Summary | |
---|---|
org.apache.ivy.plugins.resolver.FileSystemResolver |
flatDir(Map<String,?> args)
Adds a resolver that looks into a number of directories for artifacts. |
org.apache.ivy.plugins.resolver.DependencyResolver |
mavenCentral()
Adds a repository which looks in the Maven central repository for dependencies. |
org.apache.ivy.plugins.resolver.DependencyResolver |
mavenCentral(Map<String,?> args)
Adds a repository which looks in the Maven central repository for dependencies. |
GroovyMavenDeployer |
mavenDeployer()
|
GroovyMavenDeployer |
mavenDeployer(Closure configureClosure)
|
GroovyMavenDeployer |
mavenDeployer(Map<String,?> args)
Adds a repository for publishing to a Maven repository. |
GroovyMavenDeployer |
mavenDeployer(Map<String,?> args,
Closure configureClosure)
Behaves the same way as mavenDeployer(java.util.Map) . |
MavenResolver |
mavenInstaller()
|
MavenResolver |
mavenInstaller(Closure configureClosure)
|
MavenResolver |
mavenInstaller(Map<String,?> args)
Adds a repository for installing to a local Maven cache. |
MavenResolver |
mavenInstaller(Map<String,?> args,
Closure configureClosure)
Behaves the same way as mavenInstaller(java.util.Map) . |
org.apache.ivy.plugins.resolver.DependencyResolver |
mavenLocal()
Adds a repository which looks in the local Maven cache for dependencies. |
org.apache.ivy.plugins.resolver.DependencyResolver |
mavenRepo(Map<String,?> args)
Adds a repository which is Maven compatible. |
org.apache.ivy.plugins.resolver.DependencyResolver |
mavenRepo(Map<String,?> args,
Closure configClosure)
|
Methods inherited from interface org.gradle.api.artifacts.ResolverContainer |
---|
add, add, addAfter, addAfter, addBefore, addBefore, addFirst, addFirst, getAt, getByName, getByName, getMavenPomDir, getMavenScopeMappings, getResolvers, setMavenPomDir |
Methods inherited from interface org.gradle.api.NamedDomainObjectContainer |
---|
addRule, addRule, getRules |
Methods inherited from interface org.gradle.api.NamedDomainObjectCollection |
---|
findByName, getAsMap, matching, matching, withType |
Methods inherited from interface org.gradle.api.DomainObjectCollection |
---|
all, all, allObjects, allObjects, findAll, getAll, whenObjectAdded, whenObjectAdded, whenObjectRemoved, withType, withType |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Methods inherited from interface org.gradle.api.internal.artifacts.configurations.ResolverProvider |
---|
getResolvers |
Field Detail |
---|
static final String DEFAULT_MAVEN_DEPLOYER_NAME
static final String DEFAULT_MAVEN_INSTALLER_NAME
Method Detail |
---|
org.apache.ivy.plugins.resolver.FileSystemResolver flatDir(Map<String,?> args)
":junit:4.4"
instead of "junit:junit:4.4"
.
The following parameter are accepted as keys for the map:
Key | Description of Associated Value |
---|---|
name |
(optional) The name of the repository. The default is a Hash value of the rootdir paths. The name is used in the console output, to point to information related to a particular repository. A name must be unique amongst a repository group. |
dirs |
Specifies a list of rootDirs where to look for dependencies. |
Examples:
repositories { flatDir name: 'libs', dirs: "$projectDir/libs" flatDir dirs: ["$projectDir/libs1", "$projectDir/libs2"] }
args
-
InvalidUserDataException
- In the case neither rootDir nor rootDirs is specified of if both
are specified.org.apache.ivy.plugins.resolver.DependencyResolver mavenCentral(Map<String,?> args)
ResolverContainer.MAVEN_CENTRAL_URL
. The behavior of this resolver
is otherwise the same as the ones added by mavenRepo(java.util.Map)
.
The following parameter are accepted as keys for the map:
Key | Description of Associated Value |
---|---|
name |
(optional) The name of the repository. The default is "MavenRepo" is used as the name. A name must be unique amongst a repository group. |
urls |
A single jar repository or a collection of jar repositories. Sometimes the artifact lives in a different repository than the POM. In such a case you can specify further locations to look for an artifact. But be aware that the POM is only looked up in the root repository |
Examples:
repositories { mavenCentral urls: ["http://www.mycompany.com/repository1", "http://www.mycompany.com/repository2"] mavenCentral name: "nonDefaultName", urls: ["http://www.mycompany.com/repository"] }
args
- A list of urls of repositories to look for artifacts only.
mavenRepo(java.util.Map)
org.apache.ivy.plugins.resolver.DependencyResolver mavenCentral()
Examples:
repositories { mavenCentral() }
mavenRepo(java.util.Map)
,
mavenCentral(java.util.Map)
org.apache.ivy.plugins.resolver.DependencyResolver mavenLocal()
Examples:
repositories { mavenLocal() }
mavenRepo(java.util.Map)
org.apache.ivy.plugins.resolver.DependencyResolver mavenRepo(Map<String,?> args)
mavenDeployer(java.util.Map)
or mavenInstaller(java.util.Map)
.
By default the repository accepts to resolve artifacts without a pom. The repository always looks first for the pom
in the root repository. It then looks for the artifact in the root repository. Sometimes the artifact
lives in a different repository than the pom. In such a case you can specify further locations to look for an artifact.
But be aware that the pom is only looked up in the root repository.
The following parameter are accepted as keys for the map:
Key | Description of Associated Value |
---|---|
name |
(optional) The name of the repository. The default is the URL of the root repo. The name is used in the console output, to point to information related to a particular repository. A name must be unique amongst a repository group. |
urls |
A single repository url or a list of urls. The first url is the the url of the root repo. Gradle always looks first for the pom in the root repository. After this it looks for the artifact in the root repository. If the artifact can't be found there, it looks for it in the other repositories. |
Examples:
repositories { mavenRepo urls: ["http://www.mycompany.com/repository1", "http://www.mycompany.com/repository2"] mavenRepo name: "nonDefaultName", urls: ["http://www.mycompany.com/repository"] }For Ivy related reasons, Maven Snapshot dependencies are only properly resolved if no additional jar locations are specified. This is unfortunate and we hope to improve this in a future release.
args
- The argument to create the repository
mavenCentral(java.util.Map)
org.apache.ivy.plugins.resolver.DependencyResolver mavenRepo(Map<String,?> args, Closure configClosure)
GroovyMavenDeployer mavenDeployer()
GroovyMavenDeployer mavenDeployer(Closure configureClosure)
GroovyMavenDeployer mavenDeployer(Map<String,?> args)
Key | Description of Associated Value |
---|---|
name |
(optional) The name of the repository. The default is mavenDeployer-{SOME_ID}. The name is used in the console output, to point to information related to a particular repository. A name must be unique amongst a repository group. |
args
- The argument to create the repository
mavenDeployer(java.util.Map, groovy.lang.Closure)
GroovyMavenDeployer mavenDeployer(Map<String,?> args, Closure configureClosure)
mavenDeployer(java.util.Map)
. Additionally a closure can be passed to
further configure the added repository.
args
- The argument to create the repositoryconfigureClosure
-
MavenResolver mavenInstaller()
MavenResolver mavenInstaller(Closure configureClosure)
MavenResolver mavenInstaller(Map<String,?> args)
Key | Description of Associated Value |
---|---|
name |
(optional) The name of the repository. The default is mavenInstaller-{SOME_ID}. The name is used in the console output, to point to information related to a particular repository. A name must be unique amongst a repository group. |
args
- The argument to create the repository
(java.util.Map, groovy.lang.Closure)
MavenResolver mavenInstaller(Map<String,?> args, Closure configureClosure)
mavenInstaller(java.util.Map)
. Additionally a closure can be passed to
further configure the added repository.
args
- The argument to create the repositoryconfigureClosure
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |