views:

16

answers:

1

In my ivy.xml file I have dependency statements like:

<dependency conf="*->*" org="gnu" name="gcc" rev="4.2.1" changing="false">
    <artifact name="gcc" ext="tbz2" e:classifier="src"/>
</dependency>

'rev=' can be a fixed value or 'latest' or whatever.

In my build file I would like to get hold of the value of 'rev' to be uses in further work flow after resolve is run.

Is there any way to do that or read a property for this?

A: 

Use the artifactproperty task

<ivy:artifactproperty name="version.[artifact]" value="[revision]"/>

<echo message="gcc version: ${version.gcc}"/>
Mark O'Connor
Ahh.. should have read the manual better. Works lik a charm :-) Thanks!
pablaasmo
No problem. There are quite a few obscure gems hidden in the ivy documentation. Other useful tasks to check are: cachepath, buildlist, buildnumber
Mark O'Connor