我已经配置了 gradle 和 sonar 插件:
apply plugin: 'sonar'
// sonar settings - gradle-1.0-milestone-3 2 - check new sonar plugin for milestone 5 release
sonar {
server {
Url = "http://myserver:9000"
}
database {
url="jdbc:mysql://myserver:3306/sonar?useUnicode=true&characterEncoding=utf8"
driverClassName="com.mysql.jdbc.Driver"
username="usrname"
password="pwd"
}
}
- 我可以使用网络浏览器连接到声纳。
- 我可以使用简单的 java 测试程序连接到 mySQL 数据库。
- 我已将 mysqlconnector.jar 文件复制到 GRADLE_HOME/lib
当我跑步时
gradle -debug sonarAnalyze
我正进入(状态:
09:42:25.074 [ERROR] [org.gradle.BuildExceptionReporter] ... 53 more
09:42:25.074 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.net.ConnectException: **Connection refused: connect**
09:42:25.074 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.bootstrapper.Bootstrapper.remoteContent(Bootstrapper.java:123)
09:42:25.075 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.bootstrapper.Bootstrapper.downloadBatchFiles(Bootstrapper.java:156)
09:42:25.075 [ERROR] [org.gradle.BuildExceptionReporter] ... 65 more
09:42:25.075 [ERROR] [org.gradle.BuildExceptionReporter]
09:42:25.075 [LIFECYCLE] [org.gradle.BuildResultLogger]
09:42:25.076 [LIFECYCLE] [org.gradle.BuildResultLogger] **BUILD FAILED**
09:42:25.076 [LIFECYCLE] [org.gradle.BuildResultLogger]
09:42:25.076 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 5.59 secs
可能是什么问题呢?谢谢