The exec task does not process the string. Ant's core code converts the string to a File object - in this case an empty string will get converted to the base dir.
So with:
<project default="t">
<target name="t">
<exec executable="ls" output=""/>
</target>
</project>
one gets:
/home/preilly/learning/a/exec/build.xml:3: Execute failed: java.io.FileNotFoundException: /home/preilly/learning/a/exec (Is a directory)
One may one the ant-contribs's <if/> task to implement the logic.
Peter [EMAIL PROTECTED] wrote:
Hi,
I have a macrodef passing on a logfile attribute to exec's output property. If I want as default to have no logfile, how do write this in the macrodef? The easiest logic for me would be if output="" means no redirection as I then could use <attribute name="logfile" default=""/>.
Sten Rosendahl
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
