Failing Maven builds in Hudson

Filed under: Continuous integration, Maven, — Tags: CI, Hudson, Jenkins, MAVEN_OPTS, Test automation, maven.test.failure.ignore — Thomas Sundberg — 2011-01-21

Maven has a default behaviour that it fails a build if a test fails. Hudson and Jenkins turns this default behaviour up side down. Maven builds that fails are marked as unstable instead of failed. This behaviour may be surprising to anybody setting up a Maven build.

The solution is to set MAVEN_OPTS to -Dmaven.test.failure.ignore=false using the Advanced Build options on the project configuration page for a Maven job.

So set MAVEN_OPTS to

-Dmaven.test.failure.ignore=false

and your builds will fail instead of being marked as unstable.

Resources



(less...)

Pages

About
Events
Why

Categories

Agile
Automation
BDD
Clean code
Continuous delivery
Continuous deployment
Continuous integration
Cucumber
Culture
Design
DevOps
Executable specification
Gradle
Guice
J2EE
JUnit
Java
Kubernetes
Linux
Load testing
Maven
Mockito
New developers
Pair programming
PicoContainer
Presentation
Programming
Public speaking
Quality
Recruiting
Requirements
Scala
Selenium
Software craftsmanship
Software development
Spring
TDD
Teaching
Technical debt
Test automation
Tools
Web
Windows
eXtreme Programming

Authors

Thomas Sundberg
Adrian Bolboaca

Archives

Meta

rss RSS