post resolve tasks


Several tasks in Ivy are considered as post resolve task and share a common behaviour and settings accordingly.

These tasks are: All these tasks will trigger automatically a resolve if:
  • none has already been called in the current build with the attribute keep set to true (see below)
  • organisation and module are not set
Since Ivy 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

AttributeDescriptionRequired
confa comma separated list of the configurations to retrieve or '*'.
Since 2.0 you can also use '*(public)' or '*(private)'. Note that '*' is interpreted as '*(public)' when inline is true.
No. Defaults to the configurations resolved by the last resolve call, or '*' if no resolve was explicitly called
inlinetrue to use inline mode, false to resolve an ivy file (since 1.4)No. defaults false
organisationthe 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
modulethe 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
revisionthe revision constraint of the module to retrieve. Used only in inline mode. since 1.4No. Defaults to latest.integration
transitivetrue to resolve dependencies transitively, false otherwise since 1.4No. Defaults to true
haltonfailuretrue to halt the build on ivy failure, false to continueNo. Defaults to true
validatetrue to force ivy files validation against ivy.xsd, false to force no validationNo. Defaults to default ivy value (as configured in configuration file)
filethe file to resolve if a resolve is necessary since 2.0No. Defaults to the previous resolved Ivy file or to ${ivy.dep.file}
settingsRefA reference to the ivy settings that must be used by this task (since 2.0)No, 'ivy.instance' is taken by default.
resolveIdThe id which was used for a previous resolve, or the resolveId if a new resolve is performed (since 2.0)No, defaults to '[org]-[module]'.
logthe log setting to use during the resolve process. (since 2.0)
Available options are:
  • default
  • the default log settings, where all usual messages are output to the console
  • download-only
  • disable all usual messages but download ones. A resolve with everything in cache won't output any message.
  • quiet
  • disable all usual messages, making the whole resolve process quiet unless errors occur
No, defaults to 'default'.

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 define the emma tasks using this path.