Project and Target
The <project> and
<target> elements are not tasks; however,
they are found in every buildfile. Each buildfile must contain one
<project> element, which in turn contains
one or more <target> elements.
project
The <project>
element is found in every buildfile, and is always the root XML
element. It specifies a descriptive name for the buildfile, the
default target, and the base directory. It also contains all of the
<target> in the buildfile.
Attributes
-
basedir(all, File, N) The base directory from which all relative paths in the project are computed. Defaults to the directory containing the buildfile. And if this attribute is not specified, then you can set the
basedirproperty when you invoke Ant as follows:ant-Dbasedir=mydirectorytarget-
default(all, String, Y) Specifies the target to execute when no target is specified on the
antcommand line.-
name(all, String, N) A descriptive name for the Ant project. This name is used for documentation purposes and is displayed when you type
ant -projecthelp.
Content
- 0..n nested
<description>elements (1.4) Defines a description of the project for documentation purposes. Each
<description>element contains text content. Multiple descriptions are appended and displayed when you typeant -projecthelp.- 0..n nested
<filelist>elements (all) Defines project-wide
filelists that can be referenced throughout the buildfile. See Chapter 4 for a description of thefilelistDataType.- 0..n nested
<fileset>elements (all) Defines project-wide ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access