Can I use ivy dependency info in my ant build file

南笙酒味 提交于 2020-01-25 05:27:45

问题


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?


回答1:


Use the artifactproperty task

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

<echo message="gcc version: ${version.gcc}"/>


来源:https://stackoverflow.com/questions/3978189/can-i-use-ivy-dependency-info-in-my-ant-build-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!