This post has been migrated to http://www.thinkcode.se/blog/2011/01/21/failing-maven-builds-in-hudson
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
and your builds will fail instead of being marked as unstable.