This would do about the same thing: <property file="${buildconfig}.buildconfig"/> <property file="default.buildconfig"/>
No guarantee about one being a subset of the other though, nor would exceptions be thrown. Erik ----- Original Message ----- From: "jeff drost" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, November 16, 2001 9:16 AM Subject: custom properties loading task > I have written a custom task, and have a hunch that the same functionality > could be achieved with several built-in tasks. I'm hoping to find out, so I > can either use the built-in approach, or contribute my task. > > Rather than trying to explain it, I will give an example of how I use this > task. In the directory I run builds from, I have four property files, they > are: > > default.buildconfig > qa.buildconfig > stage.buildconfig > prod.buildconfig > > If I simply run "ant", the task (which is currently called buildconfig) loads > the default.buildconfig property file and copies the loaded properties into the > Project. These properties are then used by the build process. > > If I run "ant -Dbuildconfig=qa" then the default.buildconfig property file is > loaded, then the qa.buildconfig file is loaded. The properties loaded from qa > overwrite those in the default properties file. The resulting properties are > then copied into the Project. Not that if a property is defined in qa that is > not defined in default, an exception is thrown. > > I know that without this task, I could load the smaller subset of properties > first, and then load the larger superset next, but this doesn't really > guarantee that the first one is a subset. Also, I am not familiar with how I > would go about loading the first property file based on a command line > argument. Any thoughts? > > > Thanks, > Jeff Drost > > > __________________________________________________ > Do You Yahoo!? > Find the one for you at Yahoo! Personals > http://personals.yahoo.com > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>