Skip to main content



      Home
Home » Archived » Hudson » Failing the Hudson build in case of Java errors(Problem with making the Hudson job fail)
Failing the Hudson build in case of Java errors [message #1034355] Fri, 05 April 2013 06:37 Go to next message
Eclipse UserFriend
Hello everybody,

I'm having a problem(perhaps a stupid one): I'm running a .jar in an Ant Hudson step and I'm getting Java errors. However, the build of the Hudson job continues and the result is build successful. Is there a way(perhaps throw some exception type that can be propagated to Ant or Hudson) to stop the execution of the job in case of Java errors and to make it end with build fail? Maybe some options should be specified in the Properties or Java Options regions of the Ant step configuration...(If so,please be specific Very Happy )

Thanks Cool
Re: Failing the Hudson build in case of Java errors [message #1034803 is a reply to message #1034355] Fri, 05 April 2013 19:01 Go to previous messageGo to next message
Eclipse UserFriend
If you are using Ant Java Task, then it should catch the error and send the failure back to Hudson. I'm not sure what happens if you enable spawn or fork. What you can do is run your ant build in a command line and make sure ant report it as a build failure if the java process fails. If so Hudson will certainly capture that failure.
Re: Failing the Hudson build in case of Java errors [message #1035109 is a reply to message #1034803] Sat, 06 April 2013 06:32 Go to previous message
Eclipse UserFriend
Hi,

I have managed to solve it after all;it was actually my stupid fault since I forgot to set the 'failonerror' attribute of the 'java' task to true Very Happy

Thank you anyway!
Previous Topic:syntax error near unexpected token....
Next Topic:sudo: sorry, you must have a tty to run sudo
Goto Forum:
  


Current Time: Sun Jul 06 00:55:14 EDT 2025

Powered by FUDForum. Page generated in 0.03574 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top