SonarQube Gradle plugin not available?

sonarqube

(Dr. Tom Dinkelaker) #1

Dear all,

I hope it is okay, if I report an important problem of the new SonarQube Gradle plugin on this mailing list,
but I found no better channel, since on GitHub (https://github.com/SonarSource/sonar-gradle) they have deactivted the “Issues” tab.

There seems to be a problem with the automatic release of the plugin.
After facing the problem myself, I found several reports on stackoverflow and other forums,
none of the solutions there are correct and neither have they solved my problem, so I performed a root cause analysis.

Analysis:
The documentation (http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Gradle)
states that the latest stable SonarQube Gradle plugin has:

  • group ID: org.sonarsource.scanner.gradle
  • artifcat ID: sonarqube-gradle-plugin
  • version: 2.0.1 (latest stable version)
    Deployed at mavenCentral.

From which one can derive download path:
https://repo1.maven.org/maven2/org/sonarsource/scanner/gradle/sonarqube-gradle-plugin/2.0.1 --> HTTP 401
but https://repo1.maven.org/maven2/org/sonarsource/scanner/ works and gives back a list of all other plugins:

    ant/    
    api/    
    cli/    
    maven/ 

In contrast, the gradle plug-in docu states that the plug-in is deployed at https://plugins.gradle.org/m2/

From which one can derive download path:
https://plugins.gradle.org/m2/org/sonarsource/scanner/gradle/sonarqube-gradle-plugin/2.0.1 --> forward
which is forwarded to:
https://jcenter.bintray.com/org/sonarsource/scanner/gradle/sonarqube-gradle-plugin/2.0.1 --> “The requested path was not found.”

It looks like, the plugin distribution was never uploaded.
Also no other versions of this plugin are available in none of the major maven repositories.

Is the issue known? Can anybody help? Is there a public deployed maven repo with the plug-in?

Regards,
Tom Dinkelaker


(Aram Mirzadeh) #2

My local Artifactory server has it cached locally since April 28th so it looks like it was there and I found these links to work:

https://plugins.gradle.org/m2/org/sonarsource/scanner/gradle/sonarqube-gradle-plugin/2.0.1/sonarqube-gradle-plugin-2.0.1.pom
https://plugins.gradle.org/m2/org/sonarsource/scanner/gradle/sonarqube-gradle-plugin/2.0.1/sonarqube-gradle-plugin-2.0.1.jar


(Marco Vermeulen) #3

Hi Tom,

I’ve just given it quick try and didn’t seem to have any problem resolving this dependency. I simply used the information on the Plugin Portal and used the new syntax as below. My build immediately picked up the plugin:

plugins {
  id "org.sonarqube" version "2.0.1"
}

I hope this solves your problem, let us know if that did not work for you.

Regards,
Marco.