0

I am using Maven with jenkins and sonar to build src and generate reports on Sonar. I see build was successful in Jenkins (sonar added as post build action) but fails to create coverage.xml in local system. Due to which code coverage is unavailable in Sonar, it just shows up -(empty). I am building a project which has around 4000+ java source files and corresponding JUnit classes.

I am using cobertura-maven-plugin 2.5.1 in pom.xml and I could see this plugin instrumentation was successful while building the code.

In logs I could see that, Cobertura report not found at //coverage.xml message.

Could you please help me on this regard.

4

1 回答 1

1

由于 OutOfMemeryError:heapspace,未生成 coverage.xml。由于我的项目是如此之大,当我将堆内存设置为 2GB 并将 cobertura 插件内存设置为 1.5GB 时,声纳会显示代码覆盖率。使用 Jenkins 构建后操作声纳配置设置的堆内存。Cobertura 内存可以在 Sonar 设置或 pom.xml 中进行配置。

于 2013-09-12T06:57:38.817 回答