ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel FELLER" <>
Subject RE : RE : Recursive expand of properties ( ${${foo}.${bar}} )
Date Tue, 12 Aug 2003 14:35:13 GMT
I found a fragment I may reproduce, it is a very short part but it
explain my problems
#each project configure the ears it should deploy (one or n ear)
project.A.earliste = ear1,ear2,ear3
project.B.earliste = earb1,earb2,earb3
#each ear configure the j2ee module it contains (one or n)
project.A.ear1.moduleList = web1,web2
#until here no pb, only project dependant : i do it with foreach task
and propertycopy in my buildfile
#and for the properties below i use several properties file (one per
#so what i need seem to be like that :
gateway = ${gateway.${projectName}}
gateway.A = foo
gateway.B = bar
#now we define the directories : depends on env
global.distribution = c:\distribution
env.location = ${global.distribution}/${}
global.dir.bin = ${env.location}/bin
global.dir.release = ${env.location}/${gateway}/release
user = ${user.${}.${gateway}} = batman = batmantoo = robin
-----Message d'origine-----
De : Emmanuel FELLER [] 
Envoyé : mardi 12 août 2003 16:05
À : 'Ant Users List'
Objet : RE : Recursive expand of properties ( ${${foo}.${bar}} )

I must ask my boss, because the property file contains major information
under NDA. 
I should be able to prepare something without any major information but
I don't know if it will be usable to demonstrate my problem.
Thanks for looking my pb
-----Message d'origine-----
De : Dominique Devienne [] 
Envoyé : mardi 12 août 2003 15:54
À : 'Ant Users List'
Objet : RE: Recursive expand of properties ( ${${foo}.${bar}} )

I saw you post on Ant-Dev, please although it contains more info, it
still does not convey enough details to clearly understand your goal.
Would it be possible for you to post example build or properties file
snippets that demonstrate your use case? Regards, --DD
-----Original Message-----
From: Dominique Devienne [] 
Sent: Tuesday, August 12, 2003 8:25 AM
To: 'Ant Users List'
Subject: RE: Recursive expand of properties ( ${${foo}.${bar}} )
I'm afraid there is no clean solution to the over-use of such
properties. <propertycopy> indeed helps for one or two, but not many...
You may want to reconsider your use of such properties, and refactor the
way you do what you are doing. For example, one can often combine the
loading of one of many properties file, with the properties inside that
file to 'similar' effect:
<property name="thisone" ... />
<property file="${thisone}.properties" />
Anyways, if maybe you explained what you are doing as opposed to how you
planned on doing it, could this list provide alternate ways of achieving
the same end, supported natively by Ant.
Regards, --DD
-----Original Message-----
From: Emmanuel FELLER [] 
Sent: Tuesday, August 12, 2003 2:16 AM
Subject: Recursive expand of properties ( ${${foo}.${bar}} )
Hi everybody,
I am searching a way to resolve recursive expand of properties like
${${foo}.${bar}} in a properties file.
I use propertycopy in my build file but i don't know how do this in a
clean way for properties file.
(I cannot use several properties file, i tried but it causes more issues
than it correct.)
Does someone have a solution ?

View raw message