Skip to content

Commit

Permalink
[FIXED JENKINS-11353]
Browse files Browse the repository at this point in the history
Now recognises test results created by the maven-soap-ui plugin
Originally-Committed-As: 35c48cfcf563ad4429b51f7c920ee34159d8b4e9
  • Loading branch information
puug committed Jan 17, 2012
1 parent 3ba1e20 commit b5cc72f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/main/java/hudson/maven/reporters/SurefireArchiver.java
Expand Up @@ -75,7 +75,8 @@ 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"))) {
// 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 +241,8 @@ 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")))
return false;

try {
Expand Down Expand Up @@ -306,6 +308,11 @@ 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;
}
}
} catch (ComponentConfigurationException e) {
return false;
Expand Down

0 comments on commit b5cc72f

Please sign in to comment.