Apache Ant - Project

Card Puncher Data Processing


A project is the first node of a buildfile


<?xml version="1.0" encoding="UTF-8" ?>
<project name="Name of the project" default="TheDefaultTarget" basedir="..">
          This is the description of the buildfile

A project has:

  • three attributes:
    • name, the name of the project
    • default, the default target to use when no target is supplied.
    • basedir, the base directory from which all path calculations are done.
  • and a description that can be added in a description child element.

Built-in property

Built In Properties:

  • ${ant.project.name} : The project name
  • ${ant.project.default-target}: The default target
  • ${ant.project.invoked-targets}. A comma-separated list of the targets that have been specified on the command line (the IDE, an <ant> task …) when invoking the current project. This property is set when the first target is executed. So you can't use it in the implicit target (directly under the <project> tag). |

Documentation / Reference

Discover More
Card Puncher Data Processing
Apache Ant - Base Directory (basedir)

The base directory is the directory path from which all path calculations are done. The basedir is define in this order: basedir project attribute basedir property (without the basedir project tag)...
Card Puncher Data Processing
Apache Ant - Buildfile (Build.xml)

Apache Ant's buildfiles are the ant script and are written in XML. Each buildfile contains: one and at least one (default) target with task elements.
Card Puncher Data Processing
Apache Ant - Target

A target is a grouping of tasks designed to do a particular job. Targets can declare other targets that they depend on. In a build, targets are the unit of incremental build. The default target...
Card Puncher Data Processing
How to develop a Task for Ant?

How to develop a Task for Ant A class is registered as an AnT task if it's provide a method with the signature “public void execute()”. The class doesn't need to extends no superclass and...

Share this page:
Follow us:
Task Runner