I have written an ant task (bnd) that needs to indicate failure. The only way to indicate failure that 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?
views:
68answers:
1
+1
A:
Check out the tutorial at http://ant.apache.org/manual/tutorial-writing-tasks.html#complex
There they show an example that just fails gracefully, throwing a BuildException in the custom task but not showing 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.
bakoyaro
2010-09-24 20:01:38