ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conor MacNeill <>
Subject Re: Properties in Ant are immutable [was: Bug with property/propertyfile ?]
Date Mon, 21 Jul 2003 04:21:52 GMT
On Mon, 21 Jul 2003 12:50 pm, Daniel Joshua wrote:
> Since properties cannot be changed, why isn't there some form of varibles
> in Ant?
> This will really make Ant a more useful language..

In addition to Erik's comments, Ant was not intended to be a language. It was 
intended to be a description of the build structure and the tasks associated 
with that structure. A lot of people want to see Ant with more programming 
language features such as <if>, etc whilst others revile from programming in 
XML. What is the balance?

The balance in Ant is that complex control logic, etc should be encapsulated 
within tasks. OTOH, for those who want control style tasks, the Ant core 
enables them - see the ant-contrib tasks. Variables can likewise be supported 
- I think the Antelope project has them. The core Ant distribution does not 
contain them. 

One motivation behind immutable properties is to give control of the build to 
the build file runner over the build file writer. Once you introduce 
variables, the build is much less controllable from outside because the build 
file controls those values directly. With immutable properties, the build 
file runner is able to modify the operation of the build without changing the 
build file. For example, Gump takes advantage of this capability to name the 
generated artifacts for some projects.

Most builds do not need variables. If your does, you might want to re-examine 
whether you are describing your build structure or writing a program. If you 
are writing a program, think about using a custom task.

As with any issue, It's not black and white. We have struck a particular 


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message