Gradle Error Plugin with id 'org.sonarqube' not found

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
  • what are you trying to achieve
  • what have you tried so far to achieve this

Versions: SonarQube Community 7.9.1, SonarQube Plugin 2.8

I’m getting the following error when attempting to add the SonarQube Gradle plugin to my build.gradle file

Plugin with id 'org.sonarqube' not found.

Below is my build.gradle file:

   ext {
	springBootVersion = '1.5.2.RELEASE'
	log4jVersion='2.8.2'
}

subprojects {
	buildscript {
		repositories { 
			mavenCentral() 
			maven {
				url "https://plugins.gradle.org/m2/"
			}
		}
		dependencies {
			classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") 
			classpath("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.8")
		}
	}
	
	repositories {
		mavenCentral()
		jcenter()
	}
	
	
	apply plugin: 'java'
	apply plugin: 'eclipse'
	apply plugin: 'groovy'
	apply plugin: 'org.sonarqube'
	
	dependencies {
		compile('org.springframework.boot:spring-boot-starter') {
			exclude module: "spring-boot-starter-logging"
			exclude module: "logback-classic"
		}
		compile('org.springframework.boot:spring-boot-starter-web') {
			exclude module: "spring-boot-starter-logging"
			exclude module: "logback-classic"
		}
		compile("org.apache.commons:commons-lang3:3.5")
		compile("org.apache.commons:commons-collections4:4.0")
		compile("commons-io:commons-io:2.5")
		compile("com.ancientprogramming.fixedformat4j:fixedformat4j:1.2.2")
		compile("org.apache.commons:commons-exec:1.3")
		
		compile("org.slf4j:slf4j-api:1.7.25")
		compile("org.apache.logging.log4j:log4j-slf4j-impl:${log4jVersion}")
		compile("org.apache.logging.log4j:log4j-core:${log4jVersion}")
		compile("org.apache.logging.log4j:log4j-api:${log4jVersion}")
		compile("org.apache.logging.log4j:log4j-jcl:${log4jVersion}")
		compile("org.apache.logging.log4j:log4j-web:${log4jVersion}")
		testCompile("org.mockito:mockito-core:2.+")
		testCompile("org.springframework.boot:spring-boot-starter-test")
		testCompile("org.spockframework:spock-core:0.7-groovy-2.0")
		testCompile("com.h2database:h2")
	}
	
	test {
		testLogging {
			events "passed", "skipped", "failed", "standardError"
		}
	}
	
}

configure(subprojects.findAll {it.name != 'ws-core'}) {
	
	
	apply plugin:"war"
	
	dependencies {
		compile('org.springframework.boot:spring-boot-starter-actuator') {
			exclude module: "spring-boot-starter-logging"
			exclude module: "logback-classic"
		}
		compile project(':ws-core')
		testCompile project(':ws-core').sourceSets.test.output
	}
	
}