ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahamim, Zvi (Zvi)" <zraha...@avaya.com>
Subject RE: nested ${} expressions
Date Tue, 15 Jan 2002 14:20:41 GMT
I want that d will have the value: 'x'
When I do this, it doesn't work:

  <property name="a" value="aaa"/>
  <property name="b" value="bbb"/>
  <property name="c" value="${a}.${b}"/>
  <property name="aaa.bbb" value="x"/>
  <property name="d" value="${c}"/>


Zvi

-----Original Message-----
From: Wannheden, Knut [mailto:Knut@paranor.ch]
Sent: Tuesday, January 15, 2002 3:46 PM
To: 'Ant Users List'
Subject: RE: nested ${} expressions


well, it's probably due to the fact that your <property>-task for
property
'c' was processed before the tasks for the properties 'a' and 'b'.  i.e.

  <property name="a" value="aaa"/>
  <property name="b" value="bbb"/>
  <property name="c" value="${a}.${b}"/>

will work, but

  <property name="c" value="${a}.${b}"/>
  <property name="a" value="aaa"/>
  <property name="b" value="bbb"/>

won't.  hope this helps.

> -----Original Message-----
> From: Rahamim, Zvi (Zvi) [mailto:zrahamim@avaya.com]
> Sent: Dienstag, 15. Januar 2002 14:05
> To: Ant Users List
> Subject: RE: nested ${} expressions
> 
> 
> I've tried to create a property:
> name="c" value="${a}.${b}"
> and then get the value: ${c}
> Why doesn't it work?
> 
> Zvi 
> 
> 
> 
> -----Original Message-----
> From: Wannheden, Knut [mailto:Knut@paranor.ch]
> Sent: Tuesday, January 15, 2002 2:22 PM
> To: 'Ant Users List'
> Subject: RE: nested ${} expressions
> 
> 
> I've requested this feature before aswell, and the answer is: 
> you can't.
> And it won't be part of Ant2 either; the proposal was submitted too
> late.
> Further it's been stated that it makes the buildfiles too 
> complicated to
> read.
> 
> You'll have to get by without nested properties or implement a new
> <property> task... ;-(
> 
> --
> knut
> 
> 
> > -----Original Message-----
> > From: Rahamim, Zvi (Zvi) [mailto:zrahamim@avaya.com]
> > Sent: Dienstag, 15. Januar 2002 12:40
> > To: Ant Users List
> > Subject: nested ${} expressions
> > 
> > 
> > Hi all !!!
> > I have the properties:
> > a=111
> > b=222
> > 111.222=x
> > 
> > I want to do something like:
> > <echo message="${${a}.${b}}" />
> > so that it will print 'x'.
> > 
> > How can I do it?
> > 
> > Thank you!
> > 
> > Zvi 
> > 
> > --
> > To unsubscribe, e-mail:   
> > <mailto:ant-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: 
> > <mailto:ant-user-help@jakarta.apache.org>
> > 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:ant-user-help@jakarta.apache.org>
> 

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message