ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <>
Subject Re: How to suppress <exec> output?
Date Wed, 17 Mar 2004 20:25:09 GMT
--- wrote:
> The command that i am using is 
> <exec executable="cp" failifexecutionfails="false"
>   errorproperty="is.UnixStyle"/>

Firstly, you can set your property based on the
AVAILABILITY of the command.  The following example is
modified from exec's test script:

<property environment="env"/>
<!-- UNIX -->
<available file="cp" filepath="${env.PATH}"
<!-- CYGWIN -->
<available file="cp.exe" filepath="${env.PATH}"
<condition property="">
        <isset property="cp.executable"/>
        <isset property="cp.exe.executable"/>

This is more to the point than calling cp
indiscriminately.  However, to answer your original
question, using <exec>'s outputproperty attribute
should suppress the output.  Or you could use the OS
to set a null.device property to NUL for Windows (and
cygwin) or /dev/null for Unix, then use <exec
output="${null.device}" ...> .


Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam

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

View raw message