I'm running tests on a project using the surefire plugin and then need to generate a report using the "site" goal, even if there are failed tests.
The thing is that by default surefire forces the build to fail in a case of failed tests and no further goals are executed. So that I set the following configuration to surefire:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
This works well and the "site" goal is always executed, but in such a case the status of the build is always "Success" so that I can't set up emails notification.
Is there a proper way to execute the next goals after a "test" goal without ignoring the failures in the surefire plugin?
Aucun commentaire:
Enregistrer un commentaire