Skip to content

Commit

Permalink
Merge pull request #352 from puug/master
Browse files Browse the repository at this point in the history
Fix for JENKINS-11353
thanks.
Originally-Committed-As: bc3766f41f379fe517d0a4931690698e3110dfdf
  • Loading branch information
olamy committed Jan 30, 2012
2 parents 225ced4 + e480726 commit bb36b66
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/main/java/hudson/maven/reporters/SurefireArchiver.java
Expand Up @@ -75,7 +75,9 @@ public class SurefireArchiver extends MavenReporter {

public boolean preExecute(MavenBuildProxy build, MavenProject pom, MojoInfo mojo, BuildListener listener) throws InterruptedException, IOException {
if (isSurefireTest(mojo)) {
if (!mojo.is("org.apache.maven.plugins", "maven-failsafe-plugin", "integration-test")) {
if ((!mojo.is("org.apache.maven.plugins", "maven-failsafe-plugin", "integration-test"))
&& (!mojo.is("eviware", "maven-soapui-plugin", "test"))
&& (!mojo.is("eviware", "maven-soapui-pro-plugin", "test"))) {
// tell surefire:test to keep going even if there was a failure,
// so that we can record this as yellow.
// note that because of the way Maven works, just updating system property at this point is too late
Expand Down Expand Up @@ -240,7 +242,9 @@ private boolean isSurefireTest(MojoInfo mojo) {
&& (!mojo.is("com.jayway.maven.plugins.android.generation2", "maven-android-plugin", "internal-integration-test"))
&& (!mojo.is("com.jayway.maven.plugins.android.generation2", "android-maven-plugin", "internal-integration-test"))
&& (!mojo.is("org.apache.maven.plugins", "maven-surefire-plugin", "test"))
&& (!mojo.is("org.apache.maven.plugins", "maven-failsafe-plugin", "integration-test")))
&& (!mojo.is("org.apache.maven.plugins", "maven-failsafe-plugin", "integration-test"))
&& (!mojo.is("eviware", "maven-soapui-plugin", "test"))
&& (!mojo.is("eviware", "maven-soapui-pro-plugin", "test")))
return false;

try {
Expand Down Expand Up @@ -306,6 +310,16 @@ else if (mojo.is("org.sonatype.flexmojos", "flexmojos-maven-plugin", "test-run")
} else if (mojo.is("org.codehaus.mojo", "gwt-maven-plugin", "test") && mojo.pluginName.version.compareTo("1.2") < 0) {
// gwt-maven-plugin < 1.2 does not implement required Surefire option
return false;
} else if (mojo.is("eviware", "maven-soapui-plugin", "test")) {
Boolean skipTests = mojo.getConfigurationValue("skip", Boolean.class);
if (((skipTests != null) && (skipTests))) {
return false;
}
} else if (mojo.is("eviware", "maven-soapui-pro-plugin", "test")) {
Boolean skipTests = mojo.getConfigurationValue("skip", Boolean.class);
if (((skipTests != null) && (skipTests))) {
return false;
}
}
} catch (ComponentConfigurationException e) {
return false;
Expand Down

0 comments on commit bb36b66

Please sign in to comment.