tags:

views:

610

answers:

3

The ant exec task has an output property which can be used to tell ant where the output goes. I've used it to redirect the output to a file. The thing is, if I don't do something with the output, the stuff that ant prints isn't that much of a help ( it's not the complete thing ).

Is there someway of setting the output property to System.out?

A: 

The output of exec does go to standard out unless you specify the output attribute.

Jonathan Feinberg
The output ant's giving is not the full output. If I redirect it to a file, I get a totally different thing.
Geo
A: 

If you want to output to System.out, then simply do not specify the "output" attribute. If you would like to redirect to a file AND print it to System.out, you can use the tee command, which will redirect output to a given file and also echo it to standard out... I do not know if Windows supports "tee" or an equivalent.

Michael Aaron Safyan
A: 

Maybe you want to look at the error, logError (and maybe errorproperty) attributes of the exec task too. These deal with the handling of the standard error stream from the exec'd process. There may be useful information there that is going awol for some reason.

If the exec'd process decides to close stdout or stderr and send them elsewhere - there's little you can do.

martin clayton