0

I have following task in my build script.

<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>

I run this build script from my mac machine. It gives the following error.

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.

I already download the ant-contrib-0.3.jar and copied it to ANT_HOME/lib directory where ANT_HOME is /usr/share/ant.

When I search the web here they have asked to use ant-contrib-version.jar as well by building the jar by ourselves using the source. But I could not run the ant script in that source since it throwing some errors.

Can some one guide me to solve this issue.

thekbb
  • 7,668
  • 1
  • 36
  • 61
nath
  • 2,848
  • 12
  • 45
  • 75
  • See also: http://stackoverflow.com/questions/12891893/how-to-include-ant-contrib-jar-dynamically-in-ant/12900768#12900768 – Mark O'Connor Sep 18 '13 at 23:29

1 Answers1

4

ant-contrib-0.3.jar is a pretty ancient version of Ant-Contrib. The <post> task doesn't exist in it.

Instead, you'll find <post> in the latest version of Ant-Contrib: ant-contrib-1.0b3

Chad Nouis
  • 6,861
  • 1
  • 27
  • 28