Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 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
Ovidiu Stoin is currently offline Ovidiu Stoin
Messages: 2
Registered: April 2013
Junior Member
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
Winston Prakash is currently offline Winston Prakash
Messages: 391
Registered: August 2011
Location: Fremont, CA USA
Senior Member
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.

Winston Prakash
Eclipse Hudson team
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
Ovidiu Stoin is currently offline Ovidiu Stoin
Messages: 2
Registered: April 2013
Junior Member
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: Wed Jul 30 09:24:37 EDT 2014

Powered by FUDForum. Page generated in 0.03901 seconds