【发布时间】:2016-01-22 16:13:30
【问题描述】:
将我的 POM 升级到 sonar-maven-plugin:2.7 后,配置不再起作用。我在settings.xml中的配置是这样的:
<profile>
<id>sonar</id>
<properties>
<sonar.jdbc.url>jdbc:postgresql://my.server:5432/sonar</sonar.jdbc.url>
<sonar.jdbc.driverClassName>org.postgresql.Driver</sonar.jdbc.driverClassName>
<sonar.jdbc.username>xxxxx</sonar.jdbc.username>
<sonar.jdbc.password>yyyyy</sonar.jdbc.password>
<sonar.host.url>http://my.server</sonar.host.url>
</properties>
</profile>
当然,构建是从 -Psonar 开始的。使用 2.6 版一切都很好,使用 2.7 我得到了
[INFO] --- sonar-maven-plugin:2.7:sonar (default-cli) @ myproject ---
[INFO] User cache: C:\Users\me\.sonar\cache
[ERROR] SonarQube server 'http://localhost:9000' can not be reached
...
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.7:sonar (default-cli) on project myproject: Fail to download libraries from server: java.net.ConnectException: Connection refused: connect -> [Help 1]
使用 -X 开始构建在这两种情况下都为我提供了正确的 mojo 配置,尤其是日志中的 url 仍然正确
[DEBUG] (f) sonarHostURL = http://my.server
即使删除提到的缓存目录也无济于事。
除了将插件管理到 2.6 版外,我还能做什么?
【问题讨论】:
-
我可以确认这个错误。我的 sonarqube 构建计划今天早上停止工作。
-
对我来说也一样。有人已经提交了错误吗?
-
提出错误的过程似乎是在谷歌群组论坛上发布消息,所以这就是我所做的:groups.google.com/forum/#!topic/sonarqube/FSAkrB9pzOY
-
仅供参考 现在有一个 2.7.1 版本的插件修复了错误。
标签: sonarqube