It may be nice to point out somewhere in these tasks'
propaganda that the "tasks" they define can be largely
interchangeable in invocation. For example, target
"filter" below will filter a specified file and send
the contents either to the console or to a file
depending on whether the property destfile is set:
<target name="-tocon" unless="destfile">
<macrodef name="myecho">
<attribute name="message" />
<sequential>
<echo taskname="myecho"
message="Console message:" />
<echo taskname="myecho" message="${message}" />
</sequential>
</macrodef>
</target>
<target name="-tofile" if="destfile">
<presetdef name="myecho">
<echo file="${destfile}" />
</presetdef>
</target>
<target name="filter" depends="-tocon,-tofile">
<loadfile srcFile="${srcfile}" property="message">
<filterchain refid="myfilter" />
</loadfile>
<myecho message="${message}" />
</target>
I found this to be an interesting aspect of <macrodef>
and <presetdef> and just thought I would share.
-Matt
__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]