The rule for Ant is whoever defines a property first wins. That's the opposite of most environments, where the last definition is the one that's taken.
An easy way to do what you want is to take advantage of the fact that Ant is a Java app and Java apps can be passed properties via the command line:
ant -Ddeploy.mode=test target-name
Customer surveys are for companies who didn't pay proper attention to begin with.
rahulJ james
Ranch Hand
Joined: Oct 03, 2008
Posts: 123
posted
0
I understand your point from the command line...Say If I wanted to replace few other values in my property file other than this deploy.mode.. How do i do the same?
One way is to add the extra property values to the command line.
Another way is to set up your build.xml to load another properties file before your build.properties file. The user could then override property values using that file, and thus save a lot of typing on the command line.