blob: 67124cacd3a2dd958731413419768ec382e93b50 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<script type="text/javascript">var xookiConfig = {level: 1};</script>
<script type="text/javascript" src="../xooki/xooki.js"></script>
</head>
<body>
<textarea id="xooki-source">
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>changing</td><td>indicates that the module may change when resolving in inline mode. See <a href="../concept.html#change">cache and change management</a> for details. Ignored when resolving in standard mode. <span class="since">(since 2.2.0)</span></td><td>No. Defaults to false.</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>Child elements</h1>
<b><i>(Since 2.3)</i></b>
These child elements are defining an inlined ivy.xml's <a href="../ivyfile/dependencies.html">dependencies</a> elements. Thus these child elements cannot be used together with the <i>inline</i> or <i>file</i> attributes.
There is one important difference with the ivy.xml's <a href="../ivyfile/dependencies.html">dependencies</a>: there is no master configuration to handle here. There is actually only one, the one on which the resolve will run. So every attribute in <a href="../ivyfile/dependency.html">dependency</a>, <a href="../ivyfile/exclude.html">exclude</a>, <a href="../ivyfile/override.html">override</a> or <a href="../ivyfile/conflict.html">conflict</a> which is about a master configuration is not supported. And every attribute about a mapping of a master configuration on a dependency configuration is now expecting only the dependency configuration.
<table class="ant">
<thead>
<tr><th class="ant-att">Element</th><th class="ant-desc">Description</th><th class="ant-req">Cardinality</th></tr>
</thead>
<tbody>
<tr><td><a href="../ivyfile/dependency.html">dependency</a></td><td>declares a dependency to resolve</td>
<td>0..n</td></tr>
<tr><td><a href="../ivyfile/exclude.html">exclude</a></td><td>excludes artifacts, modules or whole organizations from the set of dependencies to resolve</td>
<td>0..n</td></tr>
<tr><td><a href="../ivyfile/override.html">override</a></td><td>specify an override mediation rule, overriding the revision and/or branch requested for a transitive dependency <span class="since">since 2.0</span></td>
<td>0..n</td></tr>
<tr><td><a href="../ivyfile/conflict.html">conflict</a></td><td>specify a a conflict manager for one or several dependencies <span class="since">since 2.0</span></td>
</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.
</textarea>
<script type="text/javascript">xooki.postProcess();</script>
</body>
</html>