- Home
- Download
- Documentation (2.0.0-beta1)
- History
- Trunk
- 2.x
- 2.0.x
- 2.0.0-beta1
- 2.0.0-alpha2
- 2.0.0-alpha-1
- 2.0.x
- 1.x
- 0.x
- Get Involved
- Search
cachepath
Constructs an ant path consisting of artifacts in ivy cache (or origin location with depending on useOrigin setting) for a resolved module configuration.
This is a post resolve task, with all the behaviour and attributes common to all post resolve tasks.
Please prefer the use of retrieve + standard ant path creation, which make your build more independent from ivy (once artifacts are properly retrieved, ivy is not required any more).
Built path is registered in ant with a given id, and can thus be used like any other ant path using refid.
since 1.4 The behaviour is like this when 'useOrigin=true':
- if the artifact is not local, the location from within the cache is used
- if the artifact is a local artifact, it's original location is used
Attribute | Description | Required |
---|---|---|
pathid | the id to reference the built path | Yes |
conf | a comma separated list of the configurations to put in the created path | No. Defaults to the configurations resolved by the last resolve call, or * if no resolve was explicitly called |
type | comma separated list of artifact types to accept in the path, * for all (since 1.2) | No. Defaults to * |
useOrigin | true to use original location of local artifacts, false to use only cache locations since 1.4 | No. Defaults false |
settingsRef | (since 2.0) A reference to the ivy settings that must be used by this task | No, 'ivy.instance' is taken by default. |
Examples
<cachepath pathid="default.classpath" conf="default" />Construct an ant path composed of all artifacts being part of the default configuration obtained through the last resolve call.
<cachepath pathid="default.classpath" conf="default" useOrigin="true" />Same as before but will use the original location for local artifacts, and the cache location for other artifacts.
<ivy:cachepath organisation="emma" module="emma" revision="2.0.4217" inline="true" conf="ant" pathid="emma.classpath"/>Resolves the emma module in version 2.0.4217, constructs an ant path with the corresponding artifacts, and then define the emma tasks using this path.
<taskdef resource="emma_ant.properties" classpathref="emma.classpath" />