- Documentation (2.5.0-rc1)
- Release Notes
- Tutorials
- Reference
- Introduction
- Settings Files
- Ivy Files
- Ant Tasks
- artifactproperty
- artifactreport
- buildlist
- buildnumber
- buildobr
- cachefileset
- cachepath
- checkdepsupdate
- cleancache
- configure
- convertmanifest
- convertpom
- deliver
- dependencytree
- findrevision
- fixdeps
- info
- install
- listmodules
- makepom
- post resolve tasks
- publish
- report
- repreport
- resolve
- resources
- retrieve
- settings
- var
- Using standalone
- OSGi
- Developer doc
deliver
Deliver a resolved descriptor of the current module, and possibly perform a recursive delivery of dependencies.
This task does two main things:
Generate a resolved Ivy file
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).
(since 1.3) 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.
Recursive delivery
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 sufficient 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:
-
dependency.name
: the name of the dependency to recursively deliver -
dependency.published.status
: the status to which the dependency should be delivered -
dependency.published.version
: the revision to which the dependency should be delivered -
dependency.version
: the revision of the dependency that should be delivered (the one that was retrieved during last resolve)
Both dependency.published.status
and dependency.published.version
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:
-
recursive.delivery.status
: set to the status to which all dependencies requiring to be delivered will be -
recursive.delivery.version
: set to the version to which all dependencies requiring to be delivered will be
Usually the deliver target itself triggers an another Ant build (using the ant
task) even if this is up to you to decide.
The delivered Ivy file will update its dependency revisions with those given here.
deliver and publish
The deliver
task is most of the time not called explicitly, but rather called automatically by the publish task. So, when shall the deliver task be called explicitly? 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
Attributes
Attribute | Description | Required |
---|---|---|
deliverpattern |
the pattern to use for Ivy file delivery |
No. Defaults to |
pubrevision |
the revision to use for the publication |
No. Defaults to |
pubbranch |
the branch to use for the publication |
No. Defaults to |
pubdate |
the publication date to use for the publication. This date should be either |
No. Defaults to |
status |
the status to use for the publication |
No. Defaults to |
delivertarget |
the target to call for recursive delivery |
No. No recursive delivery is done by default |
validate |
|
No. Defaults to default Ivy value (as configured in settings) |
replacedynamicrev |
|
No. Defaults to |
replaceForcedRev |
|
No. Defaults to |
merge |
if a descriptor extends a parent, merge the inherited information directly into the delivered descriptor. The |
No. Defaults to |
settingsRef |
A reference to Ivy settings that must be used by this task (since 2.0) |
No. Defaults to |
conf |
comma-separated list of configurations to include in the delivered file. Accepts wildcards. (since 2.0) |
No. Defaults to all configurations |
generateRevConstraint |
|
No. Defaults to |
Example
Deliver an Ivy file without the private configurations:
<deliver conf="*(public)"/>