I've done this but not in the build xml itself. If you use a properties file
you can simulate nested values. For instance in a build.properties I have:

archives.base.dir=archives
archives.ow32jdk12.dir=${archives.base.dir}/ow32jdk12
archives.ow32jdk13.dir=${archives.base.dir}/ow32jdk13
archives.o2kjdk13.dir=${archives.base.dir}/o2kjdk13

The nested values are evaluated when Ant reads the properties file.

hope this helps,
--dk

> -----Original Message-----
> From: J.D. Fagan [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 26, 2001 12:42 PM
> To: [EMAIL PROTECTED]
> Subject: RE: nested property references
>
>
> Yes,
>
> I made this request ;-)  I really don't understand why it would be
> rejected -- as it is quite a useful feature, IMHO.  Anyways, I do
> have some
> code somewhere in my box that does this -- so perhaps if I
> present the code
> to the Ant dev team...  Would that have any impact on the decision to
> approve this feature?  Or is it simply a time constraint problem and would
> more likely be accepted in Ant 2.1 (or whatever comes after Ant 2).
>
> JD
>
> -----Original Message-----
> From: Stefan Bodewig [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 26, 2001 4:35 AM
> To: [EMAIL PROTECTED]
> Subject: Re: nested property references
>
>
> Rob van Oostrum <[EMAIL PROTECTED]> wrote:
>
> > one more try ...
>
> sorry, I really thought somebody else had answered this.
>
> >> <property name="firstpart.${secondpart}" value="value" />
> >>
> >> It works so far. I run into problems as soon as I need to reference
> >> the property:
>
> It simply is impossible as Ant will not interpret ${} constructs
> nested into each other.
>
> This has been requested for Ant 2 and is under discussion on ant-dev,
> though it may very well be rejected.
>
> Stefan
>

Reply via email to