用法
生成报告作为项目报告的一部分
要生成 Surefire 报告作为站点生成的一部分,请在<reporting>
您的 POM 部分添加以下内容:
<project> ... <reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-report-plugin</artifactId> <version>3.0.0-M5</version> </plugin> </plugins> </reporting> ... </project>
调用时mvn site
,报表将自动包含在 Project Reports 菜单中,如下图所示。

以独立方式生成报告
该插件还可以使用其独立目标生成报告:
mvn surefire-report:report
HTML 报告应以${basedir}/target/site/surefire-report.html
.
