使用maven配置emma生成xml或文本报告
我正在尝试将 emma 添加到项目构建中。我在这里浏览了教程 - Maven emma 插件
但我无法弄清楚如何指定生成什么样的报告 - 我的意思是 txt 或 xml。如何将此部分添加到 Maven 构建中,以便在构建 POM 文件时它会在某个特定目录中生成 txt 或 xml 报告。
I am trying to add emma to project build. I went through the tutorials here -
Maven emma plugin
But i am not able to figure out how do I specify what kind of reports to generate - i mean txt or xml. How do I add this part to the maven build so that when the POM file builds it generates either txt or xml report in some specific directory.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
该功能已包含在 Sonatype Emma 插件的开发版本 emma-maven-plugin-1.3-SNAPSHOT 中,但尚未发布。
https://github.com/sonatype/emma-maven-plugin/pull/1
和
https://github.com/sonatype/emma-maven-plugin/pull/2
请注意,这与您在问题中引用的 Codehaus Emma 插件不同,但变化应该是最小的。
版本 1.3 发布后,您应该能够将以下内容放入 pom.xml 文件的报告部分以获得完整的输出格式:
The functionality has been included in the development version of the Sonatype Emma Plugin, emma-maven-plugin-1.3-SNAPSHOT, but it has not been released yet.
https://github.com/sonatype/emma-maven-plugin/pull/1
and
https://github.com/sonatype/emma-maven-plugin/pull/2
Note that this is not the same as the Codehaus Emma plugin that you referenced in your question, but the change should be minimal.
Once version 1.3 is released, you should be able to put the following in the reporting section of your pom.xml file to get the full range of output formats:
您可以使用 emma4it-maven-plugin 进行报告。 1.3版本有一些问题。
但 1.4-SNAPSHOT 工作正常。
这是相同的 git 链接: https://github.com/billmag/emma4it- maven-plugin.git
克隆存储库并执行 mvn clean 安装。
如果您不想使用 SNAPSHOT 版本,也可以使用 1.2 版本。
You can use the emma4it-maven-plugin for reporting. The 1.3 version has some issue.
But the 1.4-SNAPSHOT works fine.
Here is the git link for the same : https://github.com/billmag/emma4it-maven-plugin.git
Clone the repo and do a mvn clean install.
Also you can use 1.2 version in case you don't want to use a SNAPSHOT version.