You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by jg...@apache.org on 2005/12/26 17:51:34 UTC
svn commit: r359077 - /ant/core/trunk/docs/manual/CoreTasks/presetdef.html
Author: jglick
Date: Mon Dec 26 08:51:31 2005
New Revision: 359077
URL: http://svn.apache.org/viewcvs?rev=359077&view=rev
Log:
Mentioning workaround from #38040 re. eagerly evaluated properties.
Modified:
ant/core/trunk/docs/manual/CoreTasks/presetdef.html
Modified: ant/core/trunk/docs/manual/CoreTasks/presetdef.html
URL: http://svn.apache.org/viewcvs/ant/core/trunk/docs/manual/CoreTasks/presetdef.html?rev=359077&r1=359076&r2=359077&view=diff
==============================================================================
--- ant/core/trunk/docs/manual/CoreTasks/presetdef.html (original)
+++ ant/core/trunk/docs/manual/CoreTasks/presetdef.html Mon Dec 26 08:51:31 2005
@@ -146,6 +146,21 @@
[showmessage] message is 'Message 2'
</pre>
</blockquote>
+<p>
+It is possible to use a trick to evaluate properties when the definition is
+<em>made</em> rather than used. This can be useful if you do not expect some
+properties to be available in child builds run with
+<code><ant ... inheritall="false"></code>:
+</p>
+<blockquote><pre class="code">
+<macrodef name="showmessage-presetdef">
+ <attribute name="messageval"/>
+ <presetdef name="showmessage">
+ <echo>message is '@{messageval}'</echo>
+ </presetdef>
+</macrodef>
+<showmessage-presetdef messageval="${message}"/>
+</pre></blockquote>
<hr></hr>
<p align="center">Copyright © 2003-2005 Apache Software
Foundation. All rights Reserved.</p>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org