blob: 9146ea12ec65dd7f08bc2e5a629619041e68cd36 [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">
Deliver a resolved descriptor of the current module, and possibly perform a recursive delivery of dependencies.
This task does two main things:
<h2>Generate a resolved ivy file</h2>
This task generates a resolved descriptor of the current module, based upon the last resolve done. The resolved ivy file contains updated information about the delivered module, such as revision and status.
Moreover, all included configurations' files are included in the ivy file, and variables are replaced by their values.
Finally, in the resolved ivy file, dynamic revisions are replaced by the static ones that have been found during the resolve step, so the ivy file can be used later safely to obtain the same dependencies (providing that a revision uniquely identifies a module, which should be the case for proper ivy use).
<span class="since">since 1.3</span> The replacement of dynamic revisions by static ones can be turned off, so that dynamic revisions are kept in the ivy file. This is an exception to the recommended standard that published module descriptors be fully resolved, so use it with caution.
<h2>do recursive delivery</h2>
This is done only if a deliver target is given to the deliver task.
If a deliver target is set, then it is called (via an antcall) for each dependency which has not a suffisant status compared to the deliver status set for this task. This means that if you deliver an integration revision, no recursive delivery will be done.
If you deliver a milestone or a release revision, deliver target will be called with each integration dependency.
The deliver target is called with the following properties available:
<ul>
<li>dependency.name</li>
the name of the dependency to recursively deliver
<li>dependency.published.status</li>
the status to which the dependency should be delivered
<li>dependency.published.version</li>
the revision to which the dependency should be delivered
<li>dependency.version</li>
the revision of the dependency that should be delivered (the one that was retrieved during last resolve)
</ul>
Both <code>dependency.published.status</code> and <code>dependency.published.version</code> can be either asked to the user through ant input tasks (default behaviour), or be always the same for the whole recursive delivery process if the following properties are set:
<ul>
<li>recursive.delivery.status</li>set to the status to which all dependencies requiring to be delivered will be
<li>recursive.delivery.version</li>set to the version to which all dependencies requiring to be delivered will be
</ul>
Usually the deliver target itself triggers an another ant build (using ant task) even if this is up to you to decide.
The delivered ivy file will update its dependency revisions with those given here.
<h2>deliver and publish</h2>
The deliver task is most of the time not called explicitly, but rather called automatically by the [[ant:publish]] task. So, when shall the deliver task be called explictly? When you actually need to separate what is performed by the deliver task (see above), from what is performed by the publish task, i.e. upload a module to a repository.
And this can be particularly useful if you want to process the generated ivy file before uploading it (if you want to add automatically more information like an SCM tag used, the user who performed the release, ...).
It can also be useful if you want to trigger a recursive delivery and then ensure that you get the recursively delivered modules as dependencies. In this case your build order may look like this:
- ivy:configure
- ivy:resolve
- ivy:deliver with recursive delivery
- ivy:resolve again with the ivy file generated by the recursive delivery
- do your build stuff (compile, jar, whatever)
- ivy:publish
<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>deliverpattern</td><td>the pattern to use for ivy file delivery</td>
<td>No. Defaults to ${ivy.deliver.ivy.pattern}</td></tr>
<tr><td>pubrevision</td><td>the revision to use for the publication</td>
<td>No. Defaults to ${ivy.deliver.revision} if set, or the revision resolved if set, or a timestamp</td></tr>
<tr><td>pubbranch</td><td>the branch to use for the publication</td>
<td>No. Defaults to ${ivy.deliver.branch} if set, or the branch resolved if set, or nothing (branch info won't be updated)</td></tr>
<tr><td>pubdate</td><td>the publication date to use for the publication. This date should be either 'now', or a date given with the following pattern: yyyyMMddHHmmss</td>
<td>No. Defaults to 'now'</td></tr>
<tr><td>status</td><td>the status to use for the publication</td>
<td>No. Defaults to ${ivy.status}</td></tr>
<tr><td>delivertarget</td><td>the target to call for recursive delivery</td>
<td>No. No recursive delivery is done by default</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>replacedynamicrev</td><td>true to replace dynamic revisions by static ones in the delivered file, false to avoid this replacement <span class="since">(since 1.3)</span></td>
<td>No. Defaults to true</td></tr>
<tr><td>replaceForcedRev</td><td>true to replace revisions (static or dynamic) by the revision of the resolver in <a href="../settings/resolvers.html#common">forced mode</a>, false to avoid this replacement <span class="since">(since 2.2)</span></td>
<td>No. Defaults to false</td></tr>
<tr><td>merge</td><td>if a descriptor <a href="../ivyfile/extends.html">extends</a> a parent, merge the inherited information directly into the delivered descriptor. The <i>extends</i> element itself will be commented out in the delivered descriptor. <span class="since">(since 2.2)</span></td>
<td>No. Defaults to true.</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>conf</td><td>comma-separated list of configurations to include in the delivered file. Accepts wildcards. <span class="since">(since 2.0)</span></td>
<td>No. Defaults to all configurations</td></tr>
<tr><td>generateRevConstraint</td><td>true to automatically generate a 'revConstraint' attribute in the deliverd file (see the [[ivyfile/dependency]] page for more info about this attribute), false to never generate this attribute <span class="since">(since 2.1.0)</span></td>
<td>No. Defaults to true</td></tr>
</tbody>
</table>
<h1>Example</h1>
Deliver an ivy file without the private configurations:
<code type="xml">
<deliver conf="*(public)" />
</code>
</textarea>
<script type="text/javascript">xooki.postProcess();</script>
</body>
</html>