标签:
在build.gradle中添加如下配置
url = "http://locahost:9000"
} 命令: gradle clean build sonarAnalyze
可能的错误:
What went wrong:
Execution failed for task ‘:sonarAnalyze‘.
org.sonar.batch.bootstrapper.BootstrapException: Fail to download the file: http://locahost:9000/batch/sonar-batch-maven-compat-5.1.jar|3bf6a6eba33643805149fd9ad258744e
新插件
apply plugin: ‘sonar-runner‘
sonarRunner {
sonarProperties {
property "sonar.language", "java"
property "sonar.jdbc.url", "jdbc:mysql://locahost:3306/sonar?useUnicode=true&characterEncoding=utf8"
property "sonar.jdbc.driverClassName", "com.mysql.jdbc.Driver"
property "sonar.jdbc.username", "sonar"
property "sonar.jdbc.password", "sonar"
property "sonar.language", "java"
property "sonar.sources", "src"
property "sonar.binaries", "build"
// There is a problem when using "standard-project-layout:Sample Project" (by default)
// because of the wide space
property "sonar.projectKey", "jstinno:Mirror"
}
}
命令: gradle clean build sonarRunner
可能错误:
Could not resolve all dependencies for configuration ‘:sonarRunner‘.
Could not find org.codehaus.sonar.runner:sonar-runner-dist:2.3.
Searched in the following locations:
file:/home/android/soft/android-sdk/extras/android/m2repository/org/codehaus/sonar/runner/sonar-runner-dist/2.3/sonar-runner-dist-2.3.pom
标签:
原文地址:http://my.oschina.net/hopeMan/blog/413433