使用哪个 sonar-maven-plugin 版本? [英] Which sonar-maven-plugin version to use?

查看:192
本文介绍了使用哪个 sonar-maven-plugin 版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道我应该在哪个版本中使用哪个 sonar-maven-plugin.据我所知,有一个 org.codehaus.mojo 版本和两个 org.codehaus.sonar 版本(sonar-maven3-plugin, sonar-maven-plugin).

I am wondering which sonar-maven-plugin in which version I should use. As far as I know there is a org.codehaus.mojo version and two org.codehaus.sonar versions (sonar-maven3-plugin, sonar-maven-plugin).

据我了解,sonar-maven3-plugin 现在已弃用,应该改用 org.codehaus.sonar:sonar-maven-plugin.然而,那些 org.codehaus.sonar 版本与声纳服务器的某个版本相关联,因此直接使用它们可能没有意义.为了能够处理这个问题,有 org.codehaus.mojo:sonar-maven-plugin 检查服务器有哪个声纳版本,并从那里检查哪个 org.codehaus.sonar:sonar-maven-plugin 使用.

As far as I understand the sonar-maven3-plugin is now deprecated and the org.codehaus.sonar:sonar-maven-plugin should be used instead. However those org.codehaus.sonar version are tied to a certain version of the sonar server, therefore it makes probably no sense to use them directly. To be able to deal with this there is the org.codehaus.mojo:sonar-maven-plugin which checks which sonar version the server has and from there checks which org.codehaus.sonar:sonar-maven-plugin to use.

所以为了拥有一个独立于 Sonar 服务器版本的 maven pom,应该使用 org.sonar.mojo:sonar-maven-plugin:RELEASE 版本以确保安全.

So in order to have a maven pom that is independent of the Sonar Server Version one should probably use the org.sonar.mojo:sonar-maven-plugin:RELEASE version to be safe.

我做对了吗?

还有什么需要考虑的吗?

Any further things to consider?

谢谢

推荐答案

文档页面(参见使用 Maven 3 分析的项目"),您必须使用的插件是 org.codehaus.mojo:sonar-maven-plugin,而不是内部代码.

As described in the documentation page (see "Project analyzed with Maven 3"), the plugin you have to use is org.codehaus.mojo:sonar-maven-plugin, not the internal one(s).

这篇关于使用哪个 sonar-maven-plugin 版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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