SonarRunner in gradle 2.2 doesn’t seem to take sonar.host.url parameter - it always points to “http://localhost:9000” regardless of either Gradle code or -D flags.
I’ve tried to set the sonar host via the Gradle config, the properties file, and as a flag on the command line as per the Gradle documentation.
Regardless of how we try to set it, we always get the same error message:
SonarQube Runner 2.3 Java 1.7.0_71 Oracle Corporation (64-bit) Mac OS X 10.9.5 x86_64 INFO: Runner configuration file: NONE INFO: Project configuration file: /Users/Shared/Development/NikeBuild/nikeDev/das/branches/avintegration/sonar-project.properties INFO: Default locale: “en_US”, source code encoding: “UTF-8” (analysis is platform dependent) INFO: Work directory: /Users/Shared/Development/NikeBuild/nikeDev/das/branches/avintegration/.sonar ERROR: Sonar server ‘http://localhost:9000’ can not be reached
Our Sonar server is on version 3.7.1 of SonarCube.
This worked with Gradle 2.1.
It looks like none of the properties from the Gradle config are being utilized.
I’ve tried setting the sonarRunner to various older versions without success.
Here’s our config section: sonarRunner {
String SONAR_PROJ_NAME = System.getenv(‘GO_PIPELINE_NAME’) ?: “das.webapp”
sonarProperties {
property “sonar.host.url”,
property “sonar.jdbc.url”,
“jdbc:mysql://sonar.xxxx.net:3306/sonar”
property “sonar.jdbc.driverClassName”, “com.mysql.jdbc.Driver”
property “sonar.jdbc.username”,
“sonar”
property “sonar.jdbc.password”,
“sonar”
property “sonar.dynamicAnalysis”,
“reuseReports”
property “sonar.java.coveragePlugin”, “jacoco”
property “sonar.jacoco.reportPath”,
“${buildDir}/coverage-results/jacoco.exec”
property “sonar.projectKey”,
“${SONAR_PROJ_NAME}”
property “sonar.projectName”,
“${SONAR_PROJ_NAME}”
property “sonar.description”,
“Ecommerce web application”
} }
Any ideas? This is preventing us from upgrading to 2.2.