ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <>
Subject Re: Recursive properties resolution ?
Date Tue, 12 Aug 2003 16:36:34 GMT
Emmanuel FELLER wrote:
> Hi,
> I read the archive about the recursive properties and I am not convinced
> so i would like to reopen the debate. (Or i may have missed the good
> mail, if so correct me).
> Excuse the long mail, but i prefer explain all my problem.
> I do the all J2EE project build of my firm, the build process is exactly
> the same for all the 8 projects on the 3 environnements (execpt
> properties). So I did build files that accept param and all the param
> are given in a properties file.
> Now the dev are finishing and we will include some new environnement
> like pre-production, production, debugging.
> We cannot stay any more with one properties file for 1(project/env). We
> had 24 properties file, now we will have more than 50 (and new projects
> are comming).
> Some properties are project and environnement independant, others are
> project dependant, others are environnement dependant, others are both
> project and environnement dependant.
> So if i keep multiple file (one per project/env couple), i have multiple
> and cross redundancy. And i have no way to define the env properties,
> after the project properties and after project/env properties as they
> are mixed and cross defined. (i tried without succes).
> In this case I do not see what I can do to solve this without recursive
> properties resolution.

-have multiple properties per deployment target, one per 
project, one per local installation.

-use property expansion to decide which properties files to load

e.g. a system would have


the project then does

<property file=">
<property enviroment="env" />
<property file=">

<property file="${}.properties/>
//then app server specific stuff
<property file="${deploy.platform}.properties/>

//finally we can call our install routine
<target name="deploy" depends="makewar">
   <ant dir="." buildfile="${}" target="deploy" />

This gives you: dynamic configuration, and property file control. One 
propfile/build file per app server platform, one per system with sys 
config details, one per user with user options.

> What do you mind ? Should I develope with for an ant-contrib task as you
> reject this for ant2
> ( ?

if ant-contrib tasks work for you, use them.

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

View raw message