Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
770 views
in Technique[技术] by (71.8m points)

sonarqube - sonar.host.url not working with sonar-maven-plugin:2.7

After upgrading my POMs to sonar-maven-plugin:2.7 the configuration does not work any more. My configuration in settings.xml is like this:

<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>

The build is started with -Psonar of course. With version 2.6 everything is fine, with 2.7 I get

[INFO] --- sonar-maven-plugin:2.7:sonar (default-cli) @ myproject ---
[INFO] User cache: C:Usersme.sonarcache
[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]

Starting the build with -X gives me the correct mojo configuration in both cases, especially the url is still correct in the log

[DEBUG]   (f) sonarHostURL = http://my.server

Even deleting the mentioned caching directory does not help.

What can I do except of managing the plugin to version 2.6?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

We are investigating the issue. Ticket was created: https://jira.sonarsource.com/browse/MSONAR-129

In the meantime you could either lock the SQ plugin to version 2.6 or pass all properties using command line.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...