使用mvn声纳运行声纳分析:声纳忽略sonar-project.properties [英] Running sonar analysis with mvn sonar:sonar ignores sonar-project.properties

查看:229
本文介绍了使用mvn声纳运行声纳分析:声纳忽略sonar-project.properties的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最新的3.3声纳maven插件和5.6 LTS作为网络服务器。

mvn声纳运行声纳分析:声纳
Maven扫描仪

忽略 sonar-project.properties 文件。 (有许多参数 https://docs.sonarqube.org/display/SONAR/Analysis+Parameters

Latest 3.3 sonar-maven-plugin and 5.6 LTS as web server.
Running sonar analysis with mvn sonar:sonar ( Scanner for Maven )
ignores sonar-project.properties file. (with many parameters https://docs.sonarqube.org/display/SONAR/Analysis+Parameters)

这是预期的行为吗?

所以我必须在中配置所有声纳参数pom.xml 文件?

Is it that the expected behavior?
So do I have to configure all sonar parameters within pom.xml files?

推荐答案

这是正确的:Maven的扫描程序忽略了 sonar-project.properties file。

That is correct: the scanner for Maven ignores the sonar-project.properties file.

要在为Maven使用扫描仪时传递分析参数,
将它们设置为< properties> pom.xml 中,例如:

To pass analysis parameters when using the scanner for Maven, set them as <properties> in the pom.xml, for example:

<properties>
    <sonar.host.url>http://yourserver</sonar.host.url>
</properties>

或者,您也可以使用 -D 在命令行上,例如:

Or, you could also pass parameters using -D on the command line, for example:

mvn sonar:sonar -Dsonar.host.url=http://yourserver

这篇关于使用mvn声纳运行声纳分析:声纳忽略sonar-project.properties的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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