所以我在本地mvn verify -Pintegration-tests -Pcode-coverage spotbugs:spotbugs
运行并得到:
结果:
[INFO]
[INFO] Tests run: 342, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.5:report (post-integration-test) @ x---
[INFO] Loading execution data file /var/jenkins_home/workspace/xTeam/x/merge-request/target/coverage-reports/jacoco-it.exec
[INFO] Analyzed bundle 'x' with 129 classes
[INFO]
[INFO] --- git-commit-id-plugin:3.0.1:validateRevision (validate-the-git-infos) @ x---
[INFO]
[INFO] --- maven-failsafe-plugin:3.0.0-M3:verify (default) @ x---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 06:08 min
[INFO] Finished at: 2019-12-12T09:38:14+01:00
[INFO] ------------------------------------------------------------------------
[INFO] [jenkins-event-spy] Generated /var/jenkins_home/workspace/x Team/x/merge-request@tmp/withMavenc11f7343/maven-spy-20191212-093205-93012816127390747730671.log
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:3.0.0-M3:verify (default) on project x: There are test failures.
对我来说很奇怪,因为没有失败(0)。我没主意了。有人能帮我猜测为什么0次失败后仍然失败吗?
Maven故障安全:
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M3</version>
<executions>
<execution>
<id>integration-tests</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<argLine>${failsafeArgLine}</argLine>
</configuration>
</execution>
</executions>
</plugin>