Ant Properties
As shown in Chapter 6, “Extending Ant with Custom Tasks, Data Types, and Listeners,” Ant properties are declarative in nature. In other words, once set, a property’s value can never be changed. Why is this important? If our aim is to chain build files, we must be cognizant that if the inheritsAll flag is set on the ant task (as described in Chapter 4, “Built-in Tasks”), it is possible that namespace collisions could occur between the various build scripts. Consequently, the results of a build could vary in response to the order in which the Ant targets are executed. Although it’s desirable to be able to configure the behavior of a build, we want to be able to do so in a controlled and predictable manner.
One technique that we ...
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.