sonar-scanner连接连接sonarquebe7的的sonar.java.binaries问题的解问题的解
决方案决方案
今天小编就为大家分享一篇关于sonar-scanner连接sonarquebe7的sonar.java.binaries问题的解决方案,小编觉得内容挺
不错的,现在分享给大家,具有很好的参考价值,需要的朋友一起跟随小编来看看吧
Sonar-Scanner连接新版SonarQube7提示org.sonar.squidbridge.api.AnalysisException,暂定将sonar-java-plugin降到4.10恢复正常使
用。
现象描述现象描述
以一下版本Sonar-Scanner连接SonarQube进行Maven项目的代码检测,没有任何问题。
Sonar-Scanner命令命令
使用命令sonar-scanner,使用-D传入以下参数
问题描述问题描述
在仅仅升级了SonarQube到7.0之后,使用同样的sonar-scanner命令出现了如下的错误信息
ERROR: Error during SonarQube Scanner execution
org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarQube
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:84)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:71)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:71)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:67)
at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:218)
at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:156)
at org.sonarsource.scanner.cli.Main.execute(Main.java:74)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
...省略
原因原因
参看如下URL有一些相关提示
https://docs.sonarqube.org/display/PLUG/Java+Plugin+and+Bytecode
sonar.java.binaries
Comma-separated paths to directories containing the compiled bytecode files corresponding to your source files.
Since 4.12, analysis will fail with the message :
Please provide compiled classes of your project with sonar.java.binaries property
确认版本确认版本
确认了SonarQube7的此plugin的版本信息为5.01
评论0