I'll try to explain my problem more appropriate.
site.property
site_name=jakarta.apache.org
deploy.property
jakarta.apache.org.deployment.dir=html
When using deploy.property I want to get the key
'${site_name}.deployment.dir' which in this case gets resolved to
'jakarta.apache.org.deployment.dir'.
So if 'html' should be read from deploy.property, I should use
${jakarta.apache.org.deployment.dir}. 'jakarta.apache.org' is declared as
${site_name}. As a result, I will have to use
'${${site_name}.deployment.dir}'
What I want is that <property name="deploy.dir"
value="${${site_name}.deployment.dir}"/> evaluates to <property
name="deploy.dir" value="html"/>.
Hope this helps.
-----Original Message-----
From: Don Taylor [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 29, 2001 1:32 PM
To: [EMAIL PROTECTED]
Subject: Re: Nested properties/parameters
You can't nest properties like this, but is that what you want to do?
Seems to me you want something like:
<property name="result" value="${site_name}.deployment.dir"/>
And then you could have a properties file that defines all the
deployment directories for each site you're using:
site_1.deployment.dir=/site_1/dir
site_2.deployment.dir=/site_2/dir
and so on. Then when you want to deploy to 'site_2' for example, just
specify -Dsite_name=site_2 on the ant command line when running your
script.
--- Stefan Lecho <[EMAIL PROTECTED]> wrote:
> I would like to pass a site name as a command line parameter and then
> use it
> to construct another property name.
> The way to do this should be something similar to the following :
> Command-line parameter: 'site_name'
> Property name: 'site_name.deployment.dir'
> Resulting property: <property name="result"
> value="${${site_name}.deployment.dir}"/>
>
> The result of ${result} is '${site_name}.deployment.dir', which is
> not ok.
>
> How can I solve this issue ?
>
> Thanks.
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Stefan Lecho
> Internet Application Developer
> Wireless Technical Contact
> IconMedialab, Brussels +32.2.506.23.31
> http://www.iconmedialab.com
>
=====
Don
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/