info


since 1.4 The info task ease the access to some essential data contained in an ivy file without performing a dependency resolution.

The information is retrieved by setting ant properties:
ivy.organisationThe organisation of the module, as found in the info tag of the ivy file parsed
ivy.moduleThe name of the module, as found in the info tag of the ivy file parsed
ivy.branchThe branch of the module if any, as found in the info tag of the ivy file parsed
ivy.revisionThe revision of the module, as found in the info tag of the ivy file parsed
ivy.statusThe status of the module, as found in the info tag of the ivy file parsed
ivy.extra.[any extra attribute]Corresponding extra attribute value, as found in the info tag of the ivy file parsed
ivy.configurationsA comma separated list of configurations of the module, as declared in the configurations section
ivy.public.configurationsA comma separated list of public configurations of the module, as declared in the configurations section

Attributes

AttributeDescriptionRequired
filethe ivy file to parse Yes
settingsRefA reference to the ivy settings that must be used by this task (since 2.0)No, 'ivy.instance' is taken by default.

Examples

Given this ivy.xml file:
<ivy-module version="1.0" xmlns:e="http://ant.apache.org/ivy/extra"> 
<info organisation="apache"
module="info-all"
branch="trunk"
revision="1.0"
status="release"
e:myextraatt="myvalue"
/>
<configurations>
<conf name="default" />
<conf name="test" />
<conf name="private" visibility="private"/>
</configurations>
<dependencies>
<dependency org="org1" name="mod1.2" rev="2.0"/>
</dependencies>
</ivy-module>
<ivy:info file="${basedir}/path/to/ivy.xml" />
Parses ${basedir}/path/to/ivy.xml and set properties as described above accordingly:
ivy.organisation=apache
ivy.module=info-all
ivy.branch=trunk
ivy.revision=1.0
ivy.status=release
ivy.extra.myextraatt=myvalue
ivy.configurations=default, test, private
ivy.public.configurations=default, test