ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1086997 - in /ant/site/ant: production/faq.html sources/faq.xml
Date Wed, 30 Mar 2011 15:52:11 GMT
Author: bodewig
Date: Wed Mar 30 15:52:10 2011
New Revision: 1086997

URL: http://svn.apache.org/viewvc?rev=1086997&view=rev
Log:
Add Flaka example to the FAQ, submitted by Gilbert Rebhan

Modified:
    ant/site/ant/production/faq.html
    ant/site/ant/sources/faq.xml

Modified: ant/site/ant/production/faq.html
URL: http://svn.apache.org/viewvc/ant/site/ant/production/faq.html?rev=1086997&r1=1086996&r2=1086997&view=diff
==============================================================================
--- ant/site/ant/production/faq.html (original)
+++ ant/site/ant/production/faq.html Wed Mar 30 15:52:10 2011
@@ -1246,6 +1246,23 @@ shell-prompt> m4 foo.m4 > foo
 <property name="foo" value="foo.value" />
 <property name="var" value="foo" />
 &lt;echo&gt; ${${var}} = foo.value &lt;/echo&gt;</pre>
+                        <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>
+                        <pre class="code">
+&lt;project xmlns:fl=&quot;antlib:it.haefelinger.flaka&quot;&gt;
+  &lt;fl:install-property-handler/&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;property name=&quot;buildtype&quot; value=&quot;test&quot;/&gt;
+  &lt;property name=&quot;appserv_test&quot; value=&quot;//testserver&quot;/&gt;
+  &lt;echo&gt;
+    #{${var}} = foo.value
+    &lt;!-- nested property --&gt;
+    #{appserv_${buildtype}}
+  &lt;/echo&gt;
+&lt;/project&gt;</pre>
                     <p class="faq">
       <a name="delete-directory-children-only"></a>
       How can I delete everything beneath a particular directory,

Modified: ant/site/ant/sources/faq.xml
URL: http://svn.apache.org/viewvc/ant/site/ant/sources/faq.xml?rev=1086997&r1=1086996&r2=1086997&view=diff
==============================================================================
--- ant/site/ant/sources/faq.xml (original)
+++ ant/site/ant/sources/faq.xml Wed Mar 30 15:52:10 2011
@@ -762,6 +762,25 @@ shell-prompt> m4 foo.m4 > foo
 <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>]]></source>
       </answer>
     </faq>
 



Mime
View raw message