I have an exec
task whose output I am putting into a property using the outputproperty
attribute. The command may print some errors to stderr, I do not want the errors to be included in the output (since the output is being fed into another command) but rather to be printed out to the user. So I am redirecting the output and error into separate properties and echo
the error property. It seems kind of a hack to have to echo
the error. Is it possible to redirect the output of an exec but leave error on stderr or stdout? I assume it means setting the error
attribute to some magical value but I cannot figure out what that value is.
Try removing error
or errorproperty
attributes and adding logError="true"
.
See http://ant.apache.org/manual/Tasks/exec.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With