Browse Source

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
master
Jan Materne 15 years ago
parent
commit
bb9fcbf172
2 changed files with 22 additions and 0 deletions
  1. +11
    -0
      docs/faq.html
  2. +11
    -0
      xdocs/faq.xml

+ 11
- 0
docs/faq.html View File

@@ -1237,6 +1237,17 @@ shell-prompt> m4 foo.m4 > foo
</sequential>
</macrodef>
</pre>
<p>With the 'props' antlib (external, but also from Ant) you could
do the dereferencing with <code>${${anotherprop}</code> - not just
in the property task - instead everywhere in your buildfile (after
registering the required property helper).</p>
<pre class="code">
&lt;propertyhelper&gt;
&lt;props:nested /&gt;
&lt;/propertyhelper&gt;
&lt;property name=&quot;foo&quot; value=&quot;foo.value&quot; /&gt;
&lt;property name=&quot;var&quot; value=&quot;foo&quot; /&gt;
&lt;echo&gt; ${${var}} = foo.value &lt;/echo&gt;</pre>
<p class="faq">
<a name="delete-directory-children-only"></a>
How can I delete everything beneath a particular directory,


+ 11
- 0
xdocs/faq.xml View File

@@ -745,6 +745,17 @@ shell-prompt> m4 foo.m4 > foo
</sequential>
</macrodef>
]]></source>
<p>With the 'props' antlib (external, but also from Ant) you could
do the dereferencing with <code>${${anotherprop}</code> - not just
in the property task - instead everywhere in your buildfile (after
registering the required property helper).</p>
<source><![CDATA[
<propertyhelper>
<props:nested />
</propertyhelper>
<property name="foo" value="foo.value" />
<property name="var" value="foo" />
<echo> ${${var}} = foo.value </echo>]]></source>
</answer>
</faq>



Loading…
Cancel
Save