External tasks


by Ovidiu Predescu, Jeff Turner

External tasks

Anteater provides few more tasks which do not fit into any of the categories above. They are used to provide additional functionality, useful when writing tests.

Some of these tasks are provided by Ant Contrib project, distributed with Anteater.

The following tasks are available to Anteater:

  • foreach - iterate over a collection of values


See the ant-contrib documentation for info about this task.


Many Anteater tasks can have nested content. For example, the contentEquals element can take nested text, which will constitute the HTTP body:

            <contentEquals>This is the HTTP body</contentEquals>

Anteater provides a way to dynamically generate this body text, using Jelly scripts. One simply replaces the static text with a <jelly> element:

              <jelly script="generateResponse.jelly"/>

Anteater will run the Jelly script, and use it's output as the nested content.

By default, Anteater does not come with all the jars required to use Jelly. To jelly-enable an Anteater installation, run the following command:

            [UNIX]    anteater -f $ANTEATER_HOME/resources/scripts/install-jelly.xml
            [Windows] anteater -f %ANTEATER_HOME%\resources\scripts\install-jelly.xml

Or alternatively, run the following Anteater script:

<project name="jelly-install" default="main" basedir=".">
  <target name="main">
    <ant dir="${anteater.resources}/scripts" antfile="install-jelly.xml"/>

Where ANTEATER_HOME is where you installed Anteater.

You will be prompted to enter the URL of a jar repository. If you just press enter, the default will be used, and the install is automatic from there on. Alternatively, if you have a Maven repository locally, you can try pointing the script at this.

Attribute nameTypeDefault valueDescription

File path a Jelly script to run.


URL of a Jelly script to run.


Specifies the path to a file in which to store the script results.

Elements allowed inside jelly: none