ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeff drost <>
Subject custom properties loading task
Date Fri, 16 Nov 2001 17:16:54 GMT
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


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?

Jeff Drost

Do You Yahoo!?
Find the one for you at Yahoo! Personals

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

View raw message