On 9 October 2012 23:14, Dave <laredotorn...@zipmail.com> wrote: > Hi, > > I just installed the latest version of Jenkins on CentOS. For all my Maven > projects, I want the build to indicate failure if a single test fails. So I > tried editing the global MAVEN_OPTS by navigating to the configuration page > ... > > Jenkins -> Manage Jenkins -> Configure System > > and under the "Maven Project Configuration" section I've set the "Global > MAVEN_OPTS" to "-Djava.awt.headless=true -Dmaven.test.failure.ignore=false". > I set the second option because I want to globally indicate that all > projects should indicate failure if a single JUnit test fails. However, > after restarting Jenkins, in my multi-module project, this is not happening. > That is, there are test failures yet the project is indicating success. > > Is there another global way I can tell Jenkins to fail a Maven project if > there are test failures?
Setting the MAVEN_OPTS to -Dmaven.test.failure.ignore=false is the way I have used successfully. Can you get a smaller Maven project to fail? A single module, one test case that just does fail()? Maybe set it to the individual project and see what happens? Could you remove the headless setting to see if there is any change? HTH Thomas -- Thomas Sundberg M. Sc. in Computer Science Mobile: +46 70 767 33 15 Blog: http://thomassundberg.wordpress.com/ Twitter: @thomassundberg Better software through faster feedback