Gradle sonarqube task fails with plugin error

Hi,

I am trying to run a gradle task with sonarqube.
I cloned the sample project mentioned here https://github.com/SonarSource/sonar-scanning-examples/tree/master/sonarqube-scanner-gradle
My gradle sonarqube task fails with the below error

Build file ‘/home/ppapanda/sonar-scanning-examples/sonarqubscanner-gradle/gradle-basic/build.gradle’ line: 2
Error resolving plugin [id: ‘org.sonarqube’, version: ‘3.4.0.2513’]] from daemon DaemonInfo{pid=19700, address=[669d3401-98e4-492c-8e-956e3c5a5ec7 port:44548, addresses:[/0:0:0:0:0:0:0:1%lo, /127.0.0.1]], idle=false, context=DefaultDaemonContext[uid=f9f80079-5ba4510-87f7-7873a224fe4f,javaHome=/ade_autofs/ade_infra/nfsdo_generic/JDK8/MAIN/LINUX.X64/220504.1.8.0.333.B02/jdk8,daemonRegistryDirhome/ppapanda/.gradle/daemon,pid=19700,idleTimeout=120000,daemonOpts=-XX:PermSize=512M,-XX:MaxPermSize=512M,-Dfile.encoding=UTF-8,-ser.country=US,-Duser.language=en,-Duser.variant]}.

These are the contents of my build.gradle file

id "org.sonarqube" version "3.4.0.2513"

}

description = ‘Example of SonarQube Scanner for Gradle Usage’
version = ‘1.0’

sonarqube {
properties {
property ‘sonar.projectName’, ‘Example of SonarQube Scanner for Gradle Usage’
}
}

// In this section you declare where to find the dependencies of your project
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
mavenCentral()
maven {
url “https://plugins.gradle.org/m2/
}
jcenter()
}

dependencies {
classpath “org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.4.0.2513”
// This dependency is found on compile classpath of this component and consumers.
implementation ‘com.google.guava:guava:21.0’
tasks[‘sonarqube’].dependsOn test
// Use JUnit test framework
testImplementation ‘junit:junit:4.12’
}

Can someone help me out here.

Thanks in advance

Hi,

Can you share the full Gradle logs to understand better the error?