Several tasks in Ivy are considered as post resolve task and share a common behaviour and settings accordingly. These tasks are: <ul> <li>[[ant:retrieve]]</li> <li>[[ant:cachefileset]]</li> <li>[[ant:cachepath]]</li> <li>[[ant:artifactproperty]] <span class="since">(since 2.0)</span></li> <li>[[ant:artifactreport]] <span class="since">(since 2.0)</span></li> </ul> All these tasks will trigger automatically a resolve if: <ul> <li>none has already been called in the current build with the attribute keep set to true (see below)</li> <li>organisation and module are not set</li> </ul> <span class="since">Since Ivy 1.4</span>, there are two ways to run a [[ant:resolve]]: with an ivy file, or with the inline mode. When you call resolve with an ivy file, the default for it is to keep the resolved data for use by the subsequent post resolve tasks. When you run an inline resolve, the default is not to keep the data. You can override this behaviour by setting the keep attribute as you like. If you want to to reuse the resolved data obtained through a call to resolve in another build (i.e. not the current one), then you have to set the organisation and module attributes. This work only if the cache was not cleaned since your last resolve call. This does not work with inline calls, which must be performed in the same build. The attributes listed are then mostly used only if a resolve is triggered automatically. <h1>Attributes</h1> <table class="ant"> <thead> <tr><th class="ant-att">Attribute</th><th class="ant-desc">Description</th><th class="ant-req">Required</th></tr> </thead> <tbody> <tr><td>conf</td><td>a comma separated list of the configurations to retrieve or '*'. <span class="since">Since 2.0</span> you can also use '*(public)' or '*(private)'. Note that '*' is interpreted as '*(public)' when inline is true.</td> <td>No. Defaults to the configurations resolved by the last resolve call, or '*' if no resolve was explicitly called</td></tr> <tr><td>inline</td><td>true to use inline mode, false to resolve an ivy file <span class="since">(since 1.4)</span></td><td>No. defaults false</td></tr> <tr><td>organisation</td><td>the organisation of the module to retrieve. This usually doesn't need to be set since it defaults to the last resolved one, except for inline mode where it is required.</td><td>Yes in inline mode, otherwise no, it then defaults to last resolved module name</td></tr> <tr><td>module</td><td>the name of the module to retrieve. This usually doesn't need to be set since it defaults to the last resolved one, except for inline mode where it is required.</td><td>Yes in inline mode, otherwise no, it then defaults to last resolved module name</td></tr> <tr><td>revision</td><td>the revision constraint of the module to retrieve. Used only in inline mode. <span class="since">since 1.4</span></td><td>No. Defaults to latest.integration</td></tr> <tr><td>branch</td><td>the name of the branch to resolve in inline mode <span class="since">(since 2.1)</span></td><td>Defaults to no branch in inline mode, nothing in standard mode.</td></tr> <tr><td>transitive</td><td>true to resolve dependencies transitively, false otherwise <span class="since">since 1.4</span></td><td>No. Defaults to true</td></tr> <tr><td>resolveMode</td><td>the [[ant:resolve resolve mode]] to use when an automatic resolve is triggered <span class="since">(since 2.1)</span></td><td>No. defaults to using the resolve mode set in the [[settings settings]]</td></tr> <tr><td>keep</td><td>true to keep the results of the automatic resolve in memory, false to discard them. When this is false, the standard ivy properties won't be set and other postresolve-tasks (like retrieve and cachepath) won't be able to resuse the results of this resolve!</td><td>No. defaults to false for an inline resolve and to true in any other case</td></tr> <tr><td>haltonfailure</td><td>true to halt the build on ivy failure, false to continue</td><td>No. Defaults to true</td></tr> <tr><td>validate</td><td>true to force ivy files validation against ivy.xsd, false to force no validation</td><td>No. Defaults to default ivy value (as configured in configuration file)</td></tr> <tr><td>refresh</td><td>true to force Ivy to resolve dynamic revision in this resolve process, false to use cached resolved revision <span class="since">since 2.1</span></td><td>No. defaults to false</td></tr> <tr><td>file</td><td>the file to resolve if a resolve is necessary <span class="since">since 2.0</span></td><td>No. Defaults to the previous resolved Ivy file or to ${ivy.dep.file}</td></tr> <tr><td>settingsRef</td><td>A reference to the ivy settings that must be used by this task <span class="since">(since 2.0)</span></td><td>No, 'ivy.instance' is taken by default.</td></tr> <tr><td>resolveId</td><td>The id which was used for a previous resolve, or the resolveId if a new resolve is performed <span class="since">(since 2.0)</span></td><td>No, defaults to '[org]-[module]'.</td></tr> <tr><td>log</td><td>the log setting to use during the resolve process. <span class="since">(since 2.0)</span><br/> Available options are: <ul><li>default</li> the default log settings, where all usual messages are output to the console <li>download-only</li> disable all usual messages but download ones. A resolve with everything in cache won't output any message. <li>quiet</li> disable all usual messages, making the whole resolve process quiet unless errors occur </ul></td><td>No, defaults to 'default'.</td></tr> </tbody> </table> <h1>Examples</h1> <code type="xml"> <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" /> </code> 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.