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: [EMAIL PROTECTED]
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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to