ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xxx Yyy <ybobble-antmailingl...@yahoo.com>
Subject Re: How do I get the value of a property using a variable property name?
Date Sat, 29 May 2004 23:38:02 GMT
You can do it without special libraries using <echo>.

-----------
<project default="test">

<property name="foo" value="ABC"/>
<property name="pfoo" value="foo"/>

<target name="test">
  <echo file="deref.properties">
deref: $${${pfoo}}
  </echo>

  <property file="deref.properties"/>
</target>

</project>
-----------





Stefan Bodewig <bodewig@apache.org>
05/28/2004 06:59 AM
Please respond to "Ant Users List"

 
        To:     user@ant.apache.org
        cc: 
        Subject:        Re: How do I get the value of a property using 
a variable property name?


http://ant.apache.org/faq#propertyvalue-as-name-for-property

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


Mime
View raw message