ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <>
Subject Re: custom properties loading task
Date Fri, 16 Nov 2001 19:13:41 GMT
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.


----- Original Message -----
From: "jeff drost" <>
To: <>
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
> 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,
> are:
> default.buildconfig
> qa.buildconfig
> stage.buildconfig
> prod.buildconfig
> If I simply run "ant", the task (which is currently called buildconfig)
> 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
> loaded, then the qa.buildconfig file is loaded.  The properties loaded
from qa
> overwrite those in the default properties file.  The resulting properties
> 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
> 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
> --
> To unsubscribe, e-mail:   <>
> For additional commands, e-mail: <>

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

View raw message