SourceForge.net Logo


TaskCall is an Apache Ant task for dynamically calling another task.

For example the following :

<taskcall name="echo" text="Hello !" />

Produces exactly the same result as :

  Hello !

This task belongs to the meta-scripting style tasks group, it can be used when :

TaskCall has been created to be used along with Import and MacroDef in order to introduce build hook tasks, for example :

<for list="${extensions}" param="extension">
    <import file="@{extension}.xml" />

Loads all extension files listed in the 'extensions' property (using the ant-contrib For task).

<macrodef name="extensions-build">
  <attribute name="input" />
  <attribute name="outdir" />
      <for list="${extensions}" param="extension">
          <taskcall name="@{extension}:build" failonerror="false">
            <attribute name="input" value="@{input}" />
            <attribute name="outdir" value="@{outdir}" />

Defines a task to call all extension build hooks without failing if one of them does not exist.


This task is distributed under the Apache Software License.


TaskCall requires Ant 1.6 in order to run.


Copy the ant-taskcall.jar file into Ant's lib directory.

In your build file, add the following line :

<taskdef name="taskcall" classname="TaskCall" classpath="ant-taskcall.jar" />