Дженкинс не умеет взаимодействовать с сонаром - PullRequest
0 голосов
/ 05 июня 2018

Поскольку я пытаюсь интегрировать sonarqube 7.1 в Jenkins., Но сталкиваюсь с проблемой, как показано ниже.

Начато пользователем Admin

Building in workspace E:\eclipse-workspaces\xa-trunk3\workspace\XCore
[XCore] $ E:\eclipse-workspaces\xa-trunk3\workspace\sonarqube-7.1\sonarqube-7.1\sonar-scanner-2.6.1\sonar-scanner-2.6.1\bin\sonar-scanner.bat E:\Softwares\sonar-scanner-2.6.1\sonar-scanner-2.6.1 -Dsonar.host.url=http://localhost:9000 -Dsonar.sources=src -Dsonar.language=java -Dsonar.exclusions=**/Antlr*Lexer.java,**/Antlr*Parser.java -Dsonar.projectVersion=1.2 -Dsonar.java.binaries=bin -Dsonar.projectKey=Xcore -Dsonar.scm.provider=svn -Dsonar.java.source=1.6 -Dsonar.java.libraries=resources/lib/*.jar,resources/libTest/*.jar -Dsonar.projectName=Xcore -Dsonar.projectBaseDir=E:\eclipse-workspaces\xa-trunk3\workspace\XCore

E:\eclipse-workspaces\xa-trunk3\workspace\XCore>set ERROR_CODE=0 

E:\eclipse-workspaces\xa-trunk3\workspace\XCore>if not "C:\Program Files (x86)\Java\jdk1.8.0_20" == "" goto foundJavaHome 

E:\eclipse-workspaces\xa-trunk3\workspace\XCore>if EXIST "C:\Program Files (x86)\Java\jdk1.8.0_20\bin\java.exe" goto foundJavaExeFromJavaHome 

E:\eclipse-workspaces\xa-trunk3\workspace\XCore>set JAVA_EXEC="C:\Program Files (x86)\Java\jdk1.8.0_20\bin\java.exe" 

E:\eclipse-workspaces\xa-trunk3\workspace\XCore>if NOT "" == "" goto cleanSQScannerHome 

E:\eclipse-workspaces\xa-trunk3\workspace\XCore>set SONAR_SCANNER_HOME=E:\eclipse-workspaces\xa-trunk3\workspace\sonarqube-7.1\sonarqube-7.1\sonar-scanner-2.6.1\sonar-scanner-2.6.1\bin\.. 

E:\eclipse-workspaces\xa-trunk3\workspace\XCore>goto run 

E:\eclipse-workspaces\xa-trunk3\workspace\XCore>echo E:\eclipse-workspaces\xa-trunk3\workspace\sonarqube-7.1\sonarqube-7.1\sonar-scanner-2.6.1\sonar-scanner-2.6.1\bin\.. 
E:\eclipse-workspaces\xa-trunk3\workspace\sonarqube-7.1\sonarqube-7.1\sonar-scanner-2.6.1\sonar-scanner-2.6.1\bin\..

E:\eclipse-workspaces\xa-trunk3\workspace\XCore>set PROJECT_HOME=E:\eclipse-workspaces\xa-trunk3\workspace\XCore 

E:\eclipse-workspaces\xa-trunk3\workspace\XCore>"C:\Program Files (x86)\Java\jdk1.8.0_20\bin\java.exe" -Djava.awt.headless=true  -cp "E:\eclipse-workspaces\xa-trunk3\workspace\sonarqube-7.1\sonarqube-7.1\sonar-scanner-2.6.1\sonar-scanner-2.6.1\bin\..\lib\sonar-scanner-cli-2.6.1.jar" "-Dscanner.home=E:\eclipse-workspaces\xa-trunk3\workspace\sonarqube-7.1\sonarqube-7.1\sonar-scanner-2.6.1\sonar-scanner-2.6.1\bin\.." "-Dproject.home=E:\eclipse-workspaces\xa-trunk3\workspace\XCore" org.sonarsource.scanner.cli.Main E:\Softwares\sonar-scanner-2.6.1\sonar-scanner-2.6.1 -Dsonar.host.url=http://localhost:9000 -Dsonar.sources=src -Dsonar.language=java -Dsonar.exclusions=**/Antlr*Lexer.java,**/Antlr*Parser.java -Dsonar.projectVersion=1.2 -Dsonar.java.binaries=bin -Dsonar.projectKey=Xcore -Dsonar.scm.provider=svn -Dsonar.java.source=1.6 -Dsonar.java.libraries=resources/lib/*.jar,resources/libTest/*.jar -Dsonar.projectName=Xcore -Dsonar.projectBaseDir=E:\eclipse-workspaces\xa-trunk3\workspace\XCore 
INFO: Scanner configuration file: E:\eclipse-workspaces\xa-trunk3\workspace\sonarqube-7.1\sonarqube-7.1\sonar-scanner-2.6.1\sonar-scanner-2.6.1\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: E:\eclipse-workspaces\xa-trunk3\workspace\XCore\sonar-project.properties
INFO: SonarQube Scanner 2.6.1
INFO: Java 1.8.0_20 Oracle Corporation (64-bit)
INFO: Windows 8.1 6.3 amd64
INFO: User cache: C:\WINDOWS\system32\config\systemprofile\.sonar\cache
INFO: Publish mode
INFO: Load global settings
INFO: Load global settings (done) | time=63ms
INFO: Server id: AWOCMNoB3a7oxoEUrdXo
INFO: User cache: C:\WINDOWS\system32\config\systemprofile\.sonar\cache
INFO: Load plugins index
INFO: Load plugins index (done) | time=76ms
INFO: Load/download plugins
INFO: Load/download plugins (done) | time=13ms
INFO: SonarQube server 7.1.0
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 1.425s
INFO: Final Memory: 43M/247M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: Task 'E:\Softwares\sonar-scanner-2.6.1\sonar-scanner-2.6.1' does not exist. Please use 'list' task to see all available tasks.
ERROR: 
ERROR: To see the full stack trace of the errors, re-run SonarQube Scanner with the -e switch.
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.

E:\eclipse-workspaces\xa-trunk3\workspace\XCore>if ERRORLEVEL 1 goto error 

E:\eclipse-workspaces\xa-trunk3\workspace\XCore>set ERROR_CODE=1 

E:\eclipse-workspaces\xa-trunk3\workspace\XCore>goto exit 

E:\eclipse-workspaces\xa-trunk3\workspace\XCore>call :returncode 1 

E:\eclipse-workspaces\xa-trunk3\workspace\XCore>exit /B 1 
ERROR: SonarQube scanner exited with non-zero code: 1
Finished: FAILURE

1 Ответ

0 голосов
/ 05 июня 2018

У вас есть метка с именем «E: \ Softwares \ sonar-scanner-2.6.1 \ sonar-scanner-2.6.1» в командной строке sonar-scanner.bat, пожалуйста, удалите ее:

E:\eclipse-workspaces\xa-trunk3\workspace\sonarqube-7.1\sonarqube-7.1\sonar-scanner-2.6.1\sonar-scanner-2.6.1\bin\sonar-scanner.bat ***E:\Softwares\sonar-scanner-2.6.1\sonar-scanner-2.6.1*** 
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...