Apache Ant - Project

About

A project is the first node of a buildfile

Syntax

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

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


Powered by ComboStrap