我在构建脚本中有以下任务。
<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。
当我搜索web here时,他们也要求使用ant-contrib-version.jar,通过我们自己使用源代码构建jar。但我无法在该源代码中运行ant脚本,因为它抛出了一些错误。
有人能指导我解决这个问题吗?
发布于 2013-09-18 22:03:20
ant-contrib-0.3.jar是一个非常古老的Ant-Contrib版本。其中不存在<post>任务。
相反,您将在最新版本的Ant-Contrib:ant-contrib-1.0b3中找到<post>
https://stackoverflow.com/questions/18866348
复制相似问题