1) CachePath
Build an ant path made up of artifacts in the Ivy cache (or depending on the original location of the Useorigin settings) for the parsed module configuration.
This is a post parsing task that has all the behaviors and attributes that are common to all subsequent parsing tasks.
If you want to make your build less dependent on ivy, you can consider using the retrieve task. Once the product is properly obtained, you can use standard ant path, which makes Ivy no longer essential.
Build path is registered in ant by using a given ID, so that it can be used like other task ant paths by using refID.
2) Property
Property |
Describe |
Necessary |
Pathid |
ID used to reference the constructed path |
Is |
Conf |
Comma-delimited list of configurations |
No. The default is the configuration that was resolved the last time the call was resolved, or if no explicit invocation of resolve |
Type |
Comma separated list of artifact types to accept into the path, * for all (since 1.2) Comma-delimited list of product types that can be accepted to add to the path, * all joined (from 1.2) |
No, the default is * |
Settingsref |
(from 2.0) references to Ivy settings that must be used for this task |
No, use ' ivy.instance ' by default |
3) Examples
<cachepath pathid= "Default.classpath" conf= "Default"/>
Build an ant path made up of ownership, which is 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 the local product and use the cache location for other products.
<ivy:cachepath organisation="emma" module="emma" revision="2.0.4217" inline="true" conf="ant" pathid="emma.classpath"/>
<taskdef resource="emma_ant.properties" classpathref="emma.classpath" />
Parse version of 2.0.4217 module Emma, build an ant path with the corresponding product, and then use this path to define the Emma task.