ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <>
Subject Re: How does <exec> interpret an empty output property
Date Wed, 10 Nov 2004 13:32:28 GMT
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=""/>
one gets:
/home/preilly/learning/a/exec/build.xml:3: Execute failed: /home/preilly/learning/a/exec (Is a 

One may one the ant-contribs's <if/> task to implement the logic.

Peter wrote:

>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:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message