Table of Contents

Ant - Task

About

A task is a function and belongs to a target

The task operates only on the parameters it is given. Tasks can consume and emit items and properties. By design, they have no other insight into the state of the build. They should not discover files on disk - this makes them opaque and less reusable.

Some tasks will generate build failures if they are used outside of targets as they may cause infinite loops otherwise (<antcall> for example).

Syntax

Tasks have a common structure:

<taskname id="taskID" attribute1="value1" attribute2="value2" ... />

where:

Type

Optional

Ant supports a number of optional tasks. An optional task is a task which typically requires an external library to function.

List

Documentation