ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Clegg" <>
Subject Re: Pipeline in exec-task
Date Wed, 02 Jul 2008 10:53:59 GMT
2008/7/2 jantje <>:
> Ok (yes, I am working in /bin/bash), now I added this line, but it still does
> not suppress the output: (<arg value="2>&amp;1>/dev/null"/>)
>    <exec executable="/usr/bin/dir2lzm" failonerror="true">
>      <arg value="/tmp/module"/>
>      <arg value="${basedir}/build/application/lzm/project.lzm"/>
>      <arg value="2>&amp;1>/dev/null"/>
>    </exec>

Isn't this because ant doesn't start processes via bash (or any other
shell), but invokes them directly?

It wouldn't make sense for it to automagically start them via bash
because this would silently introduce a platform-specific dependency.
But redirection is a shell function...

You'd have to do something like

<exec executable="/usr/bin/bash" failonerror="true">
  <arg value="-c" />
  <arg value="'/usr/bin/dir2lzm /tmp/module
${basedir}/build/application/lzm/project.lzm &amp;>/dev/null'" />

... I think.


PS You can do &> as in my example to redirect both streams to the same
place, see

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

View raw message