man*_*owl 6 java sonar-runner sonarqube sonarqube5.6
看来添加sonar.scm.disabled=true到conf中是不行的。声纳扫描仪将报告以下错误:
错误:SonarQube 扫描仪执行期间出错 java.lang.IllegalStateException:在 org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:86) 上执行文件 betamao/betamao/admin.py 时出错。 sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:59) 在 org.sonar.batch.scm.ScmSensor.execute(ScmSensor.java:86) 在 org.sonar.batch.sensor.SensorWrapper.analysis( SensorWrapper.java:57) 在 org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:58) ...
我仍然需要在“常规设置 > SCM”管理页面中禁用 SCM 才能使其正常工作。
这是一个错误吗?
我的环境是:
声纳扫描仪 3.0.3.778 与 openjdk8-u131
sonarqube-5.6.6lts 与 openjdk8-u131
如果您使用Gradle构建项目,则可以使用该属性sonar.scm.disabled。
例如,将其设置在您的build.gradle:
// Let SonarQube analyze the project
sonarqube {
properties {
property "sonar.projectKey", "YourProjectId"
property "sonar.projectName", "Your Project"
property "sonar.sourceEncoding", "UTF-8"
// For SVN projects, SonarQube would run "svn blame" to know
// who changed which parts of the code. Without authorization
// this fails, so we disable it
property "sonar.scm.disabled", "True"
// Address of the SonarQube server
property "sonar.host.url", "localhost:9000"
}
}
Run Code Online (Sandbox Code Playgroud)
您还可以通过命令行将该属性传递给 Gradle:
./gradlew sonarqube -Dsonar.scm.disabled=True
Run Code Online (Sandbox Code Playgroud)