<buildnumber>

The <buildnumber> task assists in the tracking of build numbers. It’s a simple task that uses a file to get the current build number. The result of its execution is that the property build.number is set to the number read from the file, and the number in the file is incremented.

There is only one attribute as listed in Table 4.9. If the file specified does not exist, it will be created and the build number will be set to 0.

Table 4.9. Table of <buildnumber> Attributes
Attributes (Optional) Description
file The name of the file containing the build number. Defaults to build.number.

Example

In the following example, the file attribute is not specified, which will result in one of two actions. If the file build.number exists, the ...

Get Ant Developer’s Handbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.