【问题标题】:ant-contrib post task is not workingant-contrib post 任务不工作
【发布时间】:2013-09-22 20:46:23
【问题描述】:

我的构建脚本中有以下任务。

<target name="upload" depends="init">
    <taskdef resource="net/sf/antcontrib/antlib.xml"/> 
    <post to="http://testapp.com/api/builds.format" verbose="true" wantresponse="true" maxwait="0">
        <prop name="file" value="./release/temp.ipa"/>
        <prop name="notes" value="release notes"/>
    </post>
</target>

我从我的 mac 机器上运行这个构建脚本。它给出了以下错误。

Problem: failed to create task or type post
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

我已经下载了 ant-contrib-0.3.jar 并将其复制到 ANT_HOME/lib 目录,其中 ANT_HOME 是 /usr/share/ant。

当我在网上搜索here 时,他们要求使用 ant-contrib-version.jar 以及我们自己使用源代码构建 jar。但我无法在该源中运行 ant 脚本,因为它会引发一些错误。

谁能指导我解决这个问题。

【问题讨论】:

标签: java ant build ant-contrib


【解决方案1】:

ant-contrib-0.3.jar 是一个相当古老的 Ant-Contrib 版本。 &lt;post&gt; 任务中不存在。

相反,您会在最新版本的 Ant-Contrib 中找到 &lt;post&gt;ant-contrib-1.0b3

【讨论】:

    猜你喜欢
    • 2011-07-04
    • 1970-01-01
    • 1970-01-01
    • 2014-01-18
    • 1970-01-01
    • 2014-09-09
    • 1970-01-01
    • 1970-01-01
    • 2013-07-12
    相关资源
    最近更新 更多