ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r887116 - in /ant/core/trunk: docs/faq.html xdocs/faq.xml
Date Fri, 04 Dec 2009 08:54:46 GMT
Author: jhm
Date: Fri Dec  4 08:54:37 2009
New Revision: 887116

URL: http://svn.apache.org/viewvc?rev=887116&view=rev
Log:
Update FAQ: double expanding the property / nested property names

Modified:
    ant/core/trunk/docs/faq.html
    ant/core/trunk/xdocs/faq.xml

Modified: ant/core/trunk/docs/faq.html
URL: http://svn.apache.org/viewvc/ant/core/trunk/docs/faq.html?rev=887116&r1=887115&r2=887116&view=diff
==============================================================================
--- ant/core/trunk/docs/faq.html (original)
+++ ant/core/trunk/docs/faq.html Fri Dec  4 08:54:37 2009
@@ -1237,6 +1237,17 @@
   </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,

Modified: ant/core/trunk/xdocs/faq.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/xdocs/faq.xml?rev=887116&r1=887115&r2=887116&view=diff
==============================================================================
--- ant/core/trunk/xdocs/faq.xml (original)
+++ ant/core/trunk/xdocs/faq.xml Fri Dec  4 08:54:37 2009
@@ -745,6 +745,17 @@
   </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>
 



Mime
View raw message