diff --git a/maven-plugins/maven-surefire-plugin/pom.xml b/maven-plugins/maven-surefire-plugin/pom.xml
index a97cf679b2..6e9456856b 100644
--- a/maven-plugins/maven-surefire-plugin/pom.xml
+++ b/maven-plugins/maven-surefire-plugin/pom.xml
@@ -34,4 +34,10 @@
runtime
+
+
+ Joakim Erdfelt
+ joakim@erdfelt.com
+
+
diff --git a/maven-plugins/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java b/maven-plugins/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java
index 16a4695d31..913388d9de 100644
--- a/maven-plugins/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java
+++ b/maven-plugins/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java
@@ -46,10 +46,16 @@ public class SurefirePlugin
{
/**
* Set this to 'true' to bypass unit tests entirely. Its use is NOT RECOMMENDED, but quite convenient on occasion.
- * @parameter expression=${maven.test.skip}"
+ *
+ * @parameter expression="${maven.test.skip}"
*/
private boolean skip;
+ /**
+ * @parameter expression="${maven.test.failure.ignore}"
+ */
+ private boolean testFailureIgnore = false;
+
/**
* @parameter expression="${basedir}"
* @required
@@ -238,7 +244,16 @@ public class SurefirePlugin
if ( !success )
{
- throw new MojoExecutionException( "There are some test failures." );
+ String msg = "There are some test failure.";
+
+ if ( testFailureIgnore )
+ {
+ getLog().error( msg );
+ }
+ else
+ {
+ throw new MojoExecutionException( msg );
+ }
}
}