You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by To...@aol.com on 2005/01/21 00:36:16 UTC
How to supress output
Hello,
I am new to Ant. My ant script sends out email at the end of each build via org.apache.tools.ant.listener.MailLogger.
The problem that I have is that our version control system, Perforce, produces so much output our emails become huge. Is there a way to redirect the p4sync tasks output or "turn off" the MailLogger temporarily?
Thanks!
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: How to supress output
Posted by Russell Johannesson <ru...@hotmail.com>.
I recently raised a similar issue for ClearCase. In fact, I submitted an
enhancement request.
http://issues.apache.org/bugzilla/show_bug.cgi?id=33169
One developer responded that no one had ClearCase, and so they couldn't test
such a change even if they made it. Perhaps this issue could be addressed
more generally for any task that does a Runtime.exec call internally.
In the meantime, I've worked around the problem in a clumsy way using the
"exec" task to run another ant process as follows. It seems to work on
Windows.
<!--
The file target used to discard output.
"/dev/null" is standard for Unix-type systems.
It's "NUL" on Windows.
-->
<property name="file.null" value="NUL"/>
<!--
The name of the shell used to invoke ant.
-->
<property name="shell.name" value="cmd.exe"/>
<!--
The name of the file used to invoke ant.
"ant.bat works on Windows.
-->
<property name="ant.name" value="ant.bat"/>
<!--
Does the actual work of updating the ClearCase tree.
Should be called by ccUpdate inside an exec task if
standard-output suppression is desired.
-->
<target name="doCcUpdate">
<ccupdate viewpath="${clearcase.viewpath}"/>
</target>
<!--
Wraps the update in an exec to suppress verbose output
-->
<target name="ccUpdate">
<echo level="info">Sending output to ${file.null}</echo>
<exec executable="${shell.name}" output="${file.null}">
<arg line="/c ${ant.name} doCcUpdate"/>
</exec>
</target>
>From: ToddR9000@aol.com
>To: user@ant.apache.org
>Subject: How to supress output
>Date: Thu, 20 Jan 2005 18:36:16 -0500
>
>Hello,
>
>I am new to Ant. My ant script sends out email at the end of each build
>via org.apache.tools.ant.listener.MailLogger.
>
>The problem that I have is that our version control system, Perforce,
>produces so much output our emails become huge. Is there a way to redirect
>the p4sync tasks output or "turn off" the MailLogger temporarily?
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org