1

从 SonarQube 7.x 升级到 8 后,扫描已停止工作。构建任务Run Code Analysis似乎成功了几个错误,例如:

Calling the SonarQube Scanner...
INFO: Scanner configuration file: D:\agent6\_work\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.8.0\classic-sonar-scanner-msbuild\sonar-scanner-4.1.0.1829\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: D:\agent6\_work\1\.sonarqube\out\sonar-project.properties
INFO: SonarQube Scanner 4.1.0.1829
INFO: Java 1.8.0_181 Oracle Corporation (64-bit)
INFO: Windows Server 2016 10.0 amd64
INFO: User cache: C:\Windows\ServiceProfiles\NetworkService\.sonar\cache
INFO: SonarQube server 8.0.0
INFO: Default locale: "en_GB", source code encoding: "windows-1252" (analysis is platform dependent)
##[error]SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Windows/ServiceProfiles/NetworkService/.sonar/cache/6abbcd30a9bf1fba1794eb6ce16eb36f/scanner-developer-8.0-all.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Windows/ServiceProfiles/NetworkService/.sonar/cache/6abbcd30a9bf1fba1794eb6ce16eb36f/scanner-developer-8.0-all.jar!/org/slf4j/impl/StaticLoggerBinder.class]
##[error]SLF4J: Found binding in [jar:file:/C:/Windows/ServiceProfiles/NetworkService/.sonar/cache/9f2b37948b00b865aaf57dfd335e8d6a/sonar-scanner-engine-shaded-8.0-all.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Found binding in [jar:file:/C:/Windows/ServiceProfiles/NetworkService/.sonar/cache/9f2b37948b00b865aaf57dfd335e8d6a/sonar-scanner-engine-shaded-8.0-all.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
##[error]SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
WARN: SonarScanner will require Java 11+ to run starting in SonarQube 8.x

它最终以

INFO: SCM writing changed lines (done) | time=172ms 
INFO: Analysis report generated in 1813ms, dir size=2 MB 
INFO: Analysis report compressed in 8453ms, zip size=1 MB 
INFO: Analysis report uploaded in 109ms 
INFO: ANALYSIS SUCCESSFUL, you can browse https://server/sonarqube/dashboard?id=MercuryNew&pullRequest=568 
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report INFO: More about the report processing at https://server/sonarqube/api/ce/task?id=AW7u_AxnikdkBhrYNw3V 
INFO: Analysis total time: 1:19.860 s
INFO: EXECUTION SUCCESS 
INFO: Total time: 1:21.750s 
INFO: Final Memory: 77M/2590M 
INFO: ------------------------------------------------------------------------ 
The SonarQube Scanner has finished

我的 java 版本是:“1.8.0_181”,扫描仪配置包含:wrapper.java.command=C:\Program Files\Java\jdk-12.0.1\bin\java

在此处输入图像描述

有没有人遇到过这个?这是配置问题还是JAVA版本问题?如何修复扫描错误?

关于这个还有另一个问题,但在这种情况下,我有一个全新的安装。

4

1 回答 1

1

来自 Sonarqube:删除sonar-scanner-engine-shaded-8.0-all.jarlib\scanner 文件夹中的错误解决了问题。

在此处输入图像描述

于 2019-12-20T11:13:40.597 回答