Patch contains a solution for nested Properties / Properties
dereferencing with Ant Plugin Flaka (http://code.google.com/p/flaka/)
How do i..
How can I do something like <property name="prop"
value="${${anotherprop}}"/> (double expanding the property)?
Patchfile, see attached file : patchfile.txt
Regards, Gilbert
--- faq.xml.orig 2011-03-23 22:45:07.621396271 +0100
+++ faq.xml 2011-03-23 22:51:23.511342304 +0100
@@ -768,6 +768,22 @@
<property name="foo" value="foo.value" />
<property name="var" value="foo" />
<echo> ${${var}} = foo.value </echo>]]></source>
+ <p>With <a href="http://code.google.com/p/flaka/">Flaka</a> (external
Ant Plugin) you could
+ do the dereferencing with <code>#{${anotherprop}}</code> - not just
+ in flaka tasks, but all tasks after installing flaka's property
handler'.</p>
+ <source><![CDATA[
+<project xmlns:fl="antlib:it.haefelinger.flaka">
+<fl:install-property-handler/>
+ <property name="foo" value="foo.value"/>
+ <property name="var" value="foo" />
+ <property name="buildtype" value="test"/>
+ <property name="appserv_test" value="//testserver"/>
+ <echo>
+ #{${var}} = foo.value
+ <!-- nested property -->
+ #{appserv_${buildtype}}
+ </echo>
+</project>
</answer>
</faq>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]