在maven3下,哪些版本的cobertura和surefire插件可以一起使用? [英] What versions of cobertura and surefire plugins work together under maven3?

查看:96
本文介绍了在maven3下,哪些版本的cobertura和surefire插件可以一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

cobertura surefire 插件的哪些版本可以在 maven3 下一起使用?

What versions of cobertura and surefire plugins work together under maven3?

切换到maven3后,我发现mvn cobertura:cobertura不再生成有关测试覆盖率的报告(显示的覆盖率为0%).它正在maven2下工作...

After switching to maven3 I've found out, that mvn cobertura:cobertura is no longer generating report about test coverage (the coverage displayed is 0%). It was working under maven2...

但是,在发现其他项目之一仍在运行中之后,我分析了有效pom.发现我使用了其他版本的插件后,我将maven-surefire-plugin从2.8版降级到2.4.3版.我在2.5.1版中使用的是maven-cobertura-plugin.

However, after finding, that in one of the other projects reports are still working, I've analysed the effective pom. After finding out I was using other versions of plugins, I've downgraded maven-surefire-plugin from version 2.8 to 2.4.3. I'm using maven-cobertura-plugin in version 2.5.1.

这是一个可行的解决方案,但是我使用的插件版本已经很老了,但是直到找到合适的版本,我才想尝试一下.所以,我的问题是,是什么引起这两个插件之间的不兼容?是错误还是插件的行为在版本之间发生了变化,从而使其不兼容?在哪里可以找到有关插件兼容性的信息,而不是插件本身?

This is a working solution, however the plugin versions I use are quite old, but I don't want to experiment until I find the working pair of version. So, my question is, what is causing the incompatibility between this two plugins? Is it a bug or the behaviour of the plugins have changed between versions in the way that made them incompatibile? Where to find the information about plugin compatibility, and not the plugin itself?

推荐答案

请参阅我对

See my answer to this. Basically forkMode=never is not guaranteed to work with cobertura and was only working by accident in older versions of Maven.

这篇关于在maven3下,哪些版本的cobertura和surefire插件可以一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆