Before we look at using Ant for tasks specific to enterprise application development, let’s run through the basic mechanics of Ant, for readers who haven’t used Ant before. If you’ve used Ant before, you can skip this section and jump right to "Enterprise Tasks" later in this chapter.
When you execute Ant, you specify a command file that it
should use to load the definitions of targets. The buildfile uses an
XML format to define the targets and the tasks involved in running
each target. The root XML element of the buildfile is always a
<project> element, which
defines the name of the project and the default target that the
buildfile will execute (if you don’t specify one when invoking Ant).
<project> element in
Ant buildfiles supports the attributes listed in Table 17-1.
Table 17-1. Project element attributes
Descriptive name of the project,
sometimes used by IDEs and other tools to describe a
particular project buildfile. The project name can be
accessed in the buildfile using the
Name of the default target to be invoked when Ant is invoked on this buildfile with no specific target specified.
The root directory where Ant will
execute all targets and tasks in this buildfile. This base
directory will be the starting point for any relative paths
used in the buildfile. The base directory can also be
specified using the