I had a project-specific MAVEN_OPTS setting and changing the global 
MAVEN_OPTS setting didn't affect the project specific one.  Adjusting the 
project specific one fixed my problem.

Interestingly, when I created a new Maven2/3 job, the job's MAVEN_OPTS 
setting was already populated with "-Djava.awt.headless=true".  Not sure 
where this came from as my global setting is 
"-Dmaven.test.failure.ignore=false".  Another problem for another day, - 

On Tuesday, October 9, 2012 4:14:00 PM UTC-5, Dave 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?
>
> Thanks, - Dave
>

Reply via email to