You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by "sean.egan@cm-logic.com" <se...@cm-logic.com> on 2004/01/14 16:18:52 UTC

Capturing the output of a ClearCase command from Exec

Hi,

I'm trying to extent some ClearCase packages.
I'm trying to store the output from an 'lsco' command using the
ClearCase 'run' method, which in turn uses Execute.

-------------------
protected int run(Commandline cmd) {
        try {
            Project aProj = getProject();
            Execute exe
                = new Execute(new LogStreamHandler(this, Project.MSG_INFO,
Project.MSG_WARN));
            exe.setAntRun(aProj);
            exe.setWorkingDirectory(aProj.getBaseDir());
            exe.setCommandline(cmd.getCommandline());
            return exe.execute();
        } catch (java.io.IOException e) {
            throw new BuildException(e, getLocation());
        }
    }
-------------

I want to add another method (run_s) to save the actual output from
the command and not just the return code.

Can anyone help me?

Thanks, Sean.


--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org