You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Emmanuel FELLER <Em...@maaf.fr> on 2003/08/13 09:59:18 UTC

RE : Recursive properties resolution ?


>-----Message d'origine-----
>De : Steve Loughran [mailto:steve_l@iseran.com] 
>Envoyé : mardi 12 août 2003 18:37
>À : Ant Developers List
>Objet : Re: Recursive properties resolution ?
[snip/]
>> 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 files...one 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
>
>system.properties:
>deploy.target=chamonix
>
>chamonix:properties
>deploy.platform=jboss
>deploy.process=ftp
>
[snip/]
><property file="build.properties/>
><property enviroment="env" />
><property file="system.properties/>
>
>   //loads chamonix.properties
><property file="${deploy.target}.properties/>
>//then app server specific stuff
><property file="${deploy.platform}.properties/>
>
[snip/]
>
>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.
>

Hi Steve,

Thanks for your response.

I tried your way yesterday evening but now I have 18 properties files
(16 with business and build properties and 2 for the paths to the
properties file). Some of them have 50-60 properties defined, and all
others have only 3 or 4.

Is that better than having recursive resolution ? That's why I asked my
question : what is the limit betwenn several properties to maintain and
the recurive resolution concern ?

In our mind (my boss and me), we won't be able to maintain this lot of
properties files. (Because now we should store them into a SCM and
control the dependancies and the coherence betwenn all properties file
for a build as we could have multiple build in the same hour with
"naturely" change of properties).
So we will develope a recursive resolution task, it solve the potential
issue on multiple properties files management.

I will contribute this if your are interested.

Emmanuel


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: RE : Recursive properties resolution ?

Posted by Steve Loughran <st...@iseran.com>.
Emmanuel FELLER wrote:

> Hi Steve,
> 
> Thanks for your response.
> 
> I tried your way yesterday evening but now I have 18 properties files
> (16 with business and build properties and 2 for the paths to the
> properties file). Some of them have 50-60 properties defined, and all
> others have only 3 or 4.

that seems a reasonable number. If you have one per target system and 
one per app server then you avoid an explosive n*m growth in configs. So 
you keep scalability manageable.


> Is that better than having recursive resolution ? That's why I asked my
> question : what is the limit betwenn several properties to maintain and
> the recurive resolution concern ?
> 
> In our mind (my boss and me), we won't be able to maintain this lot of
> properties files. (Because now we should store them into a SCM and
> control the dependancies and the coherence betwenn all properties file
> for a build as we could have multiple build in the same hour with
> "naturely" change of properties).

Then you need to run ant with a command line that is ant 
-Dbuild.target=chamonix, or ant -Dbuild.target=zermatt for the different 
systems.


> So we will develope a recursive resolution task, it solve the potential
> issue on multiple properties files management.
> 
> I will contribute this if your are interested.

I am afraid, for the same reason we arent going to put the ant-contrib 
one in: it is the wrong way to do things.

If it were done, then it is better done properly. Recursive expansion is 
  a hack...normal languages use arrays and maps to do this kind of thing.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org