gpt4 book ai didi

gradle - 将SonarQube(4.5.4)与Gradle(2.1)连接起来会抛出HTTP 400

转载 作者:行者123 更新时间:2023-12-03 05:01:46 25 4
gpt4 key购买 nike

我想将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.

关于此 Post应该是可能的,并且 here可能是具有相关解决方法的Bug。

但是我该如何使用呢?将zip解压缩到Project中并从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工作正常。

最佳答案

声纳插件是deprecated:

You may wish to use the new Sonar Runner Plugin instead of this plugin. In particular, only the Sonar Runner plugin supports Sonar 3.4 and higher.



仅使用 Sonar Runner Plugin
apply plugin: "sonar-runner"

sonarRunner {
sonarProperties {
property "sonar.host.url", "http://localhost:9000"
property "sonar.jdbc.url", "jdbc:mysql://localhost:3306/sonar"
property "sonar.jdbc.driverClassName", "com.mysql.jdbc.Driver"
property "sonar.jdbc.username", "sonar"
property "sonar.jdbc.password", "<myPassword>"
}
}

关于gradle - 将SonarQube(4.5.4)与Gradle(2.1)连接起来会抛出HTTP 400,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31185899/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com