@@ -62,12 +62,14 @@ public class SurefireArchiver extends MavenReporter {
62
62
63
63
public boolean preExecute (MavenBuildProxy build , MavenProject pom , MojoInfo mojo , BuildListener listener ) throws InterruptedException , IOException {
64
64
if (isSurefireTest (mojo )) {
65
- // tell surefire:test to keep going even if there was a failure,
66
- // so that we can record this as yellow.
67
- // note that because of the way Maven works, just updating system property at this point is too late
68
- XmlPlexusConfiguration c = (XmlPlexusConfiguration ) mojo .configuration .getChild ("testFailureIgnore" );
69
- if (c !=null && c .getValue ().equals ("${maven.test.failure.ignore}" ) && System .getProperty ("maven.test.failure.ignore" )==null )
70
- c .setValue ("true" );
65
+ if (!mojo .is ("org.apache.maven.plugins" , "maven-failsafe-plugin" , "integration-test" )) {
66
+ // tell surefire:test to keep going even if there was a failure,
67
+ // so that we can record this as yellow.
68
+ // note that because of the way Maven works, just updating system property at this point is too late
69
+ XmlPlexusConfiguration c = (XmlPlexusConfiguration ) mojo .configuration .getChild ("testFailureIgnore" );
70
+ if (c !=null && c .getValue ().equals ("${maven.test.failure.ignore}" ) && System .getProperty ("maven.test.failure.ignore" )==null )
71
+ c .setValue ("true" );
72
+ }
71
73
}
72
74
return true ;
73
75
}
@@ -78,7 +80,8 @@ public boolean postExecute(MavenBuildProxy build, MavenProject pom, MojoInfo moj
78
80
listener .getLogger ().println (Messages .SurefireArchiver_Recording ());
79
81
80
82
File reportsDir ;
81
- if (mojo .is ("org.apache.maven.plugins" , "maven-surefire-plugin" , "test" )) {
83
+ if (mojo .is ("org.apache.maven.plugins" , "maven-surefire-plugin" , "test" ) ||
84
+ mojo .is ("org.apache.maven.plugins" , "maven-failsafe-plugin" , "integration-test" )) {
82
85
try {
83
86
reportsDir = mojo .getConfigurationValue ("reportsDirectory" , File .class );
84
87
} catch (ComponentConfigurationException e ) {
@@ -158,7 +161,8 @@ public Collection<? extends Action> getProjectActions(MavenModule module) {
158
161
159
162
private boolean isSurefireTest (MojoInfo mojo ) {
160
163
if ((!mojo .is ("com.sun.maven" , "maven-junit-plugin" , "test" ))
161
- && (!mojo .is ("org.apache.maven.plugins" , "maven-surefire-plugin" , "test" )))
164
+ && (!mojo .is ("org.apache.maven.plugins" , "maven-surefire-plugin" , "test" ))
165
+ && (!mojo .is ("org.apache.maven.plugins" , "maven-failsafe-plugin" , "integration-test" )))
162
166
return false ;
163
167
164
168
try {
0 commit comments