pom 包装模块上的 cobertura
我有一个多模块 Maven 项目。我想为网站生成一份汇总的 cobertura 报告。我运行mvn site
的模块是pom打包,所以maven在生成站点时给我这个
[INFO] >>> cobertura-maven-plugin:2.5.1:cobertura (report:cobertura) @ parent >>>
[INFO]
[INFO] --- cobertura-maven-plugin:2.5.1:instrument (report:cobertura) @ parent ---
[INFO] Skipping cobertura mojo for project with packaging type 'pom'
[INFO]
[INFO] <<< cobertura-maven-plugin:2.5.1:cobertura (report:cobertura) @ parent <<<
[INFO] Not executing cobertura:report as the cobertura data file (/home/user/parent/target/cobertura/cobertura.ser) could not be found
相关的pom部分:
...
<reportPlugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<aggregate>true</aggregate>
</configuration>
</plugin>
</reportPlugins>
...
Cobertura只生成一个空的target/site/cobertura/index.html
文件。有没有办法“强迫”cobertura运行?或者通过其他方式获取我的汇总报告?
I have a multi-module maven project. I want to generate a aggregated cobertura report for the website. The Module im running mvn site
on is pom-packaging, so maven give me this when generate the site
[INFO] >>> cobertura-maven-plugin:2.5.1:cobertura (report:cobertura) @ parent >>>
[INFO]
[INFO] --- cobertura-maven-plugin:2.5.1:instrument (report:cobertura) @ parent ---
[INFO] Skipping cobertura mojo for project with packaging type 'pom'
[INFO]
[INFO] <<< cobertura-maven-plugin:2.5.1:cobertura (report:cobertura) @ parent <<<
[INFO] Not executing cobertura:report as the cobertura data file (/home/user/parent/target/cobertura/cobertura.ser) could not be found
The related pom part:
...
<reportPlugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<aggregate>true</aggregate>
</configuration>
</plugin>
</reportPlugins>
...
Cobertura only generates a empty target/site/cobertura/index.html
file. Is there a way to "force" cobertura to run? Or another way to get my aggregated report?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在您的配置部分中使用:
In your configuration section use:
在报告生成中,我们应该启用输出格式 html,如下所示。
In report generation, we should have output format html enabled, like below.,