Skip to content

Commit

Permalink
SurefireArchiver didn't recognize failsafe:integration-test goal [JEN…
Browse files Browse the repository at this point in the history
…KINS-16696]

Originally-Committed-As: 954a368c5612b7d7e7619277aca420c7c4930517
  • Loading branch information
kutzi committed Feb 11, 2013
1 parent 9fd0363 commit f4e8241
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/hudson/maven/reporters/TestMojo.java
Expand Up @@ -36,7 +36,8 @@ protected boolean is(String artifactId, String groupId, String goal) {
},

MAVEN_SUREFIRE("org.apache.maven.plugins", "maven-surefire-plugin","test","reportsDirectory"),
MAVEN_FAILSAFE("org.apache.maven.plugins", "maven-failsafe-plugin", "verify","reportsDirectory"),
MAVEN_FAILSAFE("org.apache.maven.plugins", "maven-failsafe-plugin", "integration-test","reportsDirectory"),
MAVEN_FAILSAFE_B("org.apache.maven.plugins", "maven-failsafe-plugin", "verify","reportsDirectory"),

MAVEN_JUNIT("com.sun.maven", "maven-junit-plugin", "test","reportsDirectory"),
FLEXMOJOS("org.sonatype.flexmojos", "flexmojos-maven-plugin", "test-run",null),
Expand Down Expand Up @@ -159,7 +160,7 @@ public static TestMojo lookup(String artifactId, String groupId, String goal) {
}
}

if (goal.equals("test") || goal.equals("test-run")) {
if (goal.equals("test") || goal.equals("test-run") || goal.equals("integration-test")) {
return FALLBACK;
}

Expand Down
Expand Up @@ -35,6 +35,12 @@ public void shouldDetectMavenFailsafe() {
assertTrue(this.surefireArchiver.isTestMojo(mojo));
}

@Test
public void shouldDetectMavenFailsafe2() {
MojoInfo mojo = mojoBuilder("org.apache.maven.plugins", "maven-failsafe-plugin", "integration-test").build();
assertTrue(this.surefireArchiver.isTestMojo(mojo));
}

@Test
public void shouldDetectMavenSurefireSkip() {
MojoInfoBuilder builder = mojoBuilder("org.apache.maven.plugins", "maven-surefire-plugin", "test");
Expand Down

0 comments on commit f4e8241

Please sign in to comment.