Matt Benson wrote:
Would it be possible to add if and unless attributes to the env and
arg elements used in exec [...]
if it is "defined vs. not defined" you could use conditionally
defined presetdefs.
That is a lot more cumbersome however.
<target name="x">
<exec ...>
<arg value="-opt" if="opt"/>
</exec>
</target>
vs. (ack!)
<target name="x" depends="x-predef-with-opt,x-predef-without-opt">
<x-exec .../>
</target>
<target name="x-predef-with-opt">
<presetdef name="x-exec">
<exec>
<arg value="-opt"/>
</exec>
</presetdef>
</target>
<target name="x-predef-without-opt">
<presetdef name="x-exec">
<exec/>
</presetdef>
</target>
Also the number of extra ugly targets you have to write is exponential
in the number of distinct properties you would like to have
conditionally affect the form of the task.
-J.
--
[EMAIL PROTECTED] x22801 netbeans.org ant.apache.org
http://google.com/search?q=e%5E%28pi*i%29%2B1
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]