- 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
post resolve tasks
Several tasks in Ivy are considered as post resolve tasks and share a common behaviour and settings accordingly.
These tasks are:
-
artifactproperty (since 2.0)
-
artifactreport (since 2.0)
All these tasks will trigger a resolve automatically if:
-
none has already been called in the current build with the attribute
keep
set totrue
(see below) -
organisation and module are not set
(since 1.4) There are two ways to run a 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.
Attributes
Attribute | Description | Required |
---|---|---|
conf |
a comma separated list of the configurations to retrieve or |
No. Defaults to the configurations resolved by the last resolve call, or |
inline |
|
No. defaults |
organisation |
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. |
Yes in inline mode, otherwise no, it then defaults to last resolved module name |
module |
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. |
Yes in inline mode, otherwise no, it then defaults to last resolved module name |
revision |
the revision constraint of the module to retrieve. Used only in inline mode. (since 1.4) |
No. Defaults to latest.integration |
branch |
the name of the branch to resolve in inline mode (since 2.1) |
Defaults to no branch in inline mode, nothing in standard mode. |
changing |
indicates that the module may change when resolving in inline mode. See cache and change management for details. Ignored when resolving in standard mode (since 2.2). |
No. Defaults to |
transitive |
|
No. Defaults to |
resolveMode |
the resolve mode to use when an automatic resolve is triggered (since 2.1) |
No. defaults to using the resolve mode set in the settings |
keep |
|
No. defaults to |
haltonfailure |
|
No. Defaults to |
validate |
|
No. Defaults to default Ivy value (as configured in settings) |
refresh |
|
No. defaults to |
file |
the file to resolve if a resolve is necessary (since 2.0) |
No. Defaults to the previous resolved Ivy file or to |
settingsRef |
A reference to Ivy settings that must be used by this task (since 2.0) |
No, defaults to |
resolveId |
The id which was used for a previous resolve, or the resolveId if a new resolve is performed (since 2.0) |
No, defaults to |
log |
the log setting to use during the resolve process (since 2.0) Available options are: |
No, defaults to |
Child elements
[since 2.3]
These child elements are defining an inlined ivy.xml’s dependencies elements. Thus these child elements cannot be used together with the inline
or file
attributes.
There is one important difference with the ivy.xml’s dependencies: 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 dependency, exclude, override or conflict 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.
Element | Description | Cardinality |
---|---|---|
declares a dependency to resolve |
0..n |
|
excludes artifacts, modules or whole organizations from the set of dependencies to resolve |
0..n |
|
specify an override mediation rule, overriding the revision and/or branch requested for a transitive dependency (since 2.0) |
0..n |
Examples
<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"/>
Resolves the Emma module in version 2.0.4217, constructs an Ant path with the corresponding artifacts, and then defines the Emma tasks using this path.