我想将 Gradle(2.1 版)与 SonarQube(4.5.4 LTS)连接起来,但是有这个异常
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':<myProject>:sonarAnalyze'.
> java.io.IOException: Server returned HTTP response code: 400 for URL: http://localhost:9000/batch/
* Try:
Run with --debug option to get more log output.
与这篇文章相关的应该是可能的,这可能是带有相关解决方法的错误。
但是我该如何使用它呢?将 zip 解压缩到项目中并从 zip 文件中导入 build.gradle 中的行对我不起作用:((没有区别)。
build.gradle 中的声纳配置:
apply plugin: "sonar"
sonar {
server {
url = "http://localhost:9000"
}
database {
url = "jdbc:mysql://localhost:3306/sonar"
driverClassName = "com.mysql.jdbc.Driver"
username = "sonar"
password = <myPassword>
}
}
apply plugin: 'sonar-runner'
sonarRunner {
sonarProperties {
property 'sonar.host.url', 'http://localhost:9000'
}
}
提前致谢 :)
PS:Gradle 和 Sonarqube 工作正常。