How to get ant not to print stack trace BuildException / ExitStatusException

I wrote an ant (bnd) task, which should indicate a failure. The only way to indicate the failure I found is to throw a BuildException / ExitStatusException . However, I do not want a stack trace, because it just takes up unnecessary screen space. Any idea how to achieve this?

+6
java ant
source share
1 answer

Check out the tutorial at http://ant.apache.org/manual/tutorial-writing-tasks.html#complex

There, they show an example that simply fails by throwing a BuildException into the user task but not displaying the stack trace in the console window.

The code to pay attention to is in the execute() method of the HelloWorld 'class and where the HelloWorld task is called from the use.fail target.

+3
source share

All Articles