我可以在我的 ant 构建文件中使用常春藤依赖信息吗 [英] Can I use ivy dependency info in my ant build file

查看:19
本文介绍了我可以在我的 ant 构建文件中使用常春藤依赖信息吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的 ivy.xml 文件中,我有如下依赖语句:

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=' 可以是固定值或 'latest' 或其他任何值.

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

在我的构建文件中,我想掌握 'rev' 的值,以便在运行解析后在进一步的工作流程中使用.

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?

推荐答案

使用 artifactproperty 任务

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

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

这篇关于我可以在我的 ant 构建文件中使用常春藤依赖信息吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆