From bb9fcbf172c3b1656a17b2968c0ebff85037e205 Mon Sep 17 00:00:00 2001 From: Jan Materne Date: Fri, 4 Dec 2009 08:54:37 +0000 Subject: [PATCH] Update FAQ: double expanding the property / nested property names git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@887116 13f79535-47bb-0310-9956-ffa450edef68 --- docs/faq.html | 11 +++++++++++ xdocs/faq.xml | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/docs/faq.html b/docs/faq.html index d51cb5d40..52a0d3c2f 100644 --- a/docs/faq.html +++ b/docs/faq.html @@ -1237,6 +1237,17 @@ shell-prompt> m4 foo.m4 > foo </sequential> </macrodef> +

With the 'props' antlib (external, but also from Ant) you could + do the dereferencing with ${${anotherprop} - not just + in the property task - instead everywhere in your buildfile (after + registering the required property helper).

+
+<propertyhelper>
+  <props:nested />
+</propertyhelper>
+<property name="foo" value="foo.value" />
+<property name="var" value="foo" />
+<echo> ${${var}} = foo.value </echo>

How can I delete everything beneath a particular directory, diff --git a/xdocs/faq.xml b/xdocs/faq.xml index 86e981699..11f7dc827 100644 --- a/xdocs/faq.xml +++ b/xdocs/faq.xml @@ -745,6 +745,17 @@ shell-prompt> m4 foo.m4 > foo ]]> +

With the 'props' antlib (external, but also from Ant) you could + do the dereferencing with ${${anotherprop} - not just + in the property task - instead everywhere in your buildfile (after + registering the required property helper).

+ + + + + + ${${var}} = foo.value ]]>