ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pdw <>
Subject over-riding properties and the concept of scope
Date Thu, 05 Jul 2001 20:15:57 GMT
As a new user to ant setting up build files for my first (large) project, one 
thing I find very strange and counter-intuitive is the idea that you can't 
over-ride the value of properties once they are set.

I have set up a project with some sub-projects that could be stand-alone, but 
can also be a called from a "meta" build-file that builds all sub-projects. 
If I have variables with the same name in the main build-file they will 
over-ride the variable in the sub-build-file.  

I find this to be counter-intuitive because it's exactly the opposite of the 
way variable scope normally works-- normally "inner" declarations override 
"outer" declarations.

Why does it work like this?  Does it strike anybody else as strange?


View raw message