【问题标题】:How do I get the Ivy version from a Ant build.xml如何从 Ant build.xml 获取 Ivy 版本
【发布时间】:2013-11-20 20:55:01
【问题描述】:

我在这里束手无策...我只想能够从 build.xml 文件中获取 Ivy 的版本,因为我们需要 2.2.0+。应该很简单,但我一直没能找到方法……有没有办法做到这一点?

【问题讨论】:

    标签: java ant ivy build.xml


    【解决方案1】:

    运行 ivy 解析任务将设置一系列 ivy 属性:

    <target name="version">
        <ivy:resolve/>
        <echoproperties prefix="ivy."/>
    </target>
    

    示例输出:

    [echoproperties] #Ant properties
    [echoproperties] #Fri Nov 08 21:21:08 GMT 2013
    [echoproperties] ivy.basedir=/home/mark/project
    ..
    ..
    [echoproperties] ivy.version=2.3.0
    

    【讨论】:

      猜你喜欢
      • 2018-02-24
      • 1970-01-01
      • 2011-11-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-04-05
      • 1970-01-01
      • 2012-07-31
      相关资源
      最近更新 更多