看到别人用ant生成了junit test report,而自己的maven2只在target的surefire-reports中生成了一堆的txt/xml文件。打开pom.xml发现:surefire-reports被加在了build中。把这段设置去掉,在reporting中加入:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
</plugin>
于是surefire-report.html在site中生成了,同时依然会生成surefire-reports。
当然还可以设置一些configuration。
上面是针对maven2;maven1中相应的plugin是:maven-junit-report-plugin。
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
</plugin>
于是surefire-report.html在site中生成了,同时依然会生成surefire-reports。
当然还可以设置一些configuration。
上面是针对maven2;maven1中相应的plugin是:maven-junit-report-plugin。
412

被折叠的 条评论
为什么被折叠?



