Home » Apache Ant Tasks

Apache Ant Tasks

Task is a piece of code that can be executed. A task can have multiple attributes and each task has a common structure. A common structure consists of task-name, attributes etc. See an example below.

Task Structure

A task may comprises of:

Apache Ant tasks are categories into two category.

  • Built-in Tasks
  • User defined Tasks

Apache Ant Predefined (Built-In) Tasks

Tasks those are provided by Apache Ant itself in it’s library are known as built-in tasks. Apache ant provides large number of built-in tasks which can be used to execute distinguish tasks. A list is given below.

  • Archive Tasks
  • Audit Tasks
  • Compile Tasks
  • Execution Tasks
  • File Tasks
  • Logging Tasks
  • Mail Tasks

and many more…

Archive Tasks

Tasks which are used to compress and uncompress data are know as archive tasks. Some common built-in archived tasks are tabled below.

Task Name Description
Ear An extension of the Jar task with special treatment for files.
Jar A set of files.
Tar Creates a tar archive.
Unjar Unzips a jarfile.
Untar Untars a tarfile.
Unwar Unzips a warfile.
Unzip Unzip a zip file.
War An extension of the Jar tasks.

Audit Tasks

You may also like