You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by jeff drost <je...@yahoo.com> on 2001/11/16 17:53:46 UTC

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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: custom properties ... sorry wrong list

Posted by jeff drost <je...@yahoo.com>.
My apologies

Jeff

__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>