我对集成 gradle 2.14 和 sonarqube 5.6 LTS 有一点问题。我的 gradle.build 如下所示:
repositories {
mavenCentral()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:1.2'
....
}
apply plugin: 'org.sonarqube'
和 gradle 属性:
systemProp.sonar.host.url=http://localhost:9000
systemProp.sonar.login=sonar
systemProp.sonar.password=sonar
systemProp.sonar.sourceEncoding=UTF-8
systemProp.sonar.projectKey=some_project...
systemProp.sonar.ws.timeout=60
甚至当我像这样更改最新版本的插件时:
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.0.1"
}
}
apply plugin: "org.sonarqube"
我遇到了异常(使用模式--info gradle):
:sonarqube FAILED
:sonarqube (Thread[Task worker,5,main]) completed. Took 1.421 secs.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':sonarqube'.
> Unable to load component class org.sonar.batch.bootstrap.BatchPluginInstaller
谢谢你的帮助。