在我的ivy.xml文件中,我有依赖语句,如:
<dependency conf="*->*" org="gnu" name="gcc" rev="4.2.1" changing="false">
<artifact name="gcc" ext="tbz2" e:classifier="src"/>
</dependency>
'rev ='可以是固定值或'最新'或其他。
在我的构建文件中,我希望获得'rev'的值,以便在运行resolve之后在进一步的工作流程中使用。
有没有办法做到这一点或为此阅读财产?
答案 0 :(得分:2)
使用artifactproperty任务
<ivy:artifactproperty name="version.[artifact]" value="[revision]"/>
<echo message="gcc version: ${version.gcc}"/>