resolve

The resolve task actually resolve dependencies described in an ivy file, and put the resolved dependencies in the ivy cache.If configure has not been called before resolve is called, a default configuration will be used (equivalent to call configure with no attributes).

After the call to this task, four properties are set in ant:

ivy.organisation

set to the organisation name found in the ivyfile which was used for resolve

ivy.module

set to the module name found in the ivyfile which was used for resolve

ivy.revision

set to the revision name found in the ivyfile which was used for resolve, or a generated revision name if no revision was specified in the file

ivy.resolved.configurations

set to the comma separated list of configurations resolved

Since 1.2:An additional property is set to true if the resolved dependencies are changes since the last resolve, and to false otherwise:

ivy.deps.changed

Since 2.0:The property ivy.deps.changed will not be set (and not be computed) if you set the parameter checkIfCompiled to false. (by default it is true to keep backward compatibility). This allow to optimize your build when you have multi-module build with multiple configurations.

Since 2.0:In addition, if the resolveId attribute has been set, the following properties are set as well:

ivy.organisation.${resolveId}

ivy.module.${resolveId}

ivy.revision.${resolveId}

ivy.resolved.configurations.${resolveId}

ivy.deps.changed.${resolveId}

When ivy has finished the resolve task, it outputs a summary of what has been resolved. This summary looks like this:

This table gives some statistics about the dependency resolution. Each line correspond to a configuration resolved. Then the table is divided in two parts:

modules

number

This is the total number of dependency modules resolved in this configuration, including transitive ones

search

This is the number of dependency modules that required a repository access. The repository access is needed if the module is not yet in cache, or if a latest version is required, or in some other cases (depending on checkModified, for instance)

dwnlded

This is the number of dependency ivy files downloaded from the repository. This number can be less than the total number of modules even with a clean cache, if no ivy file is provided for some dependencies.

evicted

This is the number of dependency module evicted by conflict managers.

artifacts

number

This is the total number of artifacts resolved in the given configuration.

dwnlded

This is the number of artifacts actually downloaded from the repository.

Inline mode

since 1.4 The inline mode allow to call a resolve without an ivy file, by setting directly the module which should be resolved from the repository. It is particularly useful to install released software, like an ant task for example. When inline is set to true, the organisation module and revision attributes are used to specify which module should be resolved from the repository.

Resolve mode

since 2.0 The resolve mode allows to define how Ivy should use dependency revision constraints when performing the resolution.

Two modes are available:

default

In this mode the default revision constraint (expressed with the rev attribute in the dependency element) is used.

dynamic

In this mode the dynamic revision constraint (expressed with the revConstraint attribute in the dependency element) is used.

Concurrency

During resolve, Ivy creates a file in the resolution cache. The creation of this file is not aimed to support concurrency, meaning that you can't have two concurrent resolve of the same module, in the same resolution cache, with the same resolveId.

Note for developers:After the call to this task, a reference to the module descriptor resolved is put in the ant project under the id

"ivy.resolved.descriptor"

.

Attributes

Attribute

Description

Required

file

path to the ivy file to use for resolution

No. Defaults to ${ivy.dep.file} or nothing in inline mode

conf

a comma separated list of the configurations to resolve, or '*'. Since 2.0, you can also use '*(private)', '*(public)'. Note that when inline is true, the configuration '*' is equivalent as '*(public)'.

No. Defaults to ${ivy.configurations}

refresh

true to force Ivy to resolve dynamic revision in this resolve process, false to use cached resolved revision since 2.0

No. defaults to false

resolveMode

the resolve mode to use for this dependency resolution process since 2.0