ERROR: Invalid value of sonar.sources
11,856
I see the error:
ERROR: The folder 'C:Program Files (x86)JenkinsworkspaceDownStream-UpStreamSonaTestNumberGeneratorsrcmainjavacommkyong sonar.language=java'
does not exist for 'App sonar.projectBaseDir= C:Program Files (x86)JenkinsworkspaceDownStream-UpStreamSonaTestNumberGenerator'
(base directory = C:\Program Files (x86)\Jenkins\workspace\DownStream-UpStream\SonaTest)
You started the process with:
[SonaTest] $ "C:\Program Files (x86)\Jenkins\tools\hudson.plugins.sonar.SonarRunnerInstallation\SonaScan\bin\sonar-scanner.bat"
-e -Dsonar.host.url=http://localhost:9000 ********
"-Dsonar.projectBaseDir=C:\Program Files (x86)\Jenkins\workspace\DownStream-UpStream\SonaTest"
Make sure to double the \
in order for the sonar.projectBaseDir
to find the actual folder.
That is:
-Dsonar.projectBaseDir=C:\\Program Files (x86)\\Jenkins...
See more at Analyzing Source Code / Analysis Parameters .
The OP Badal Singh reports in the comments:
It was due to wrong folder path I have mentioned in
sonar.properties
file
Related videos on Youtube
Author by
Badal Singh
Updated on June 04, 2022Comments
-
Badal Singh almost 2 years
Trying to running sonartest but it's getting failed saying :
My jenkins console output:
Started by user Badal Singh Building on master in workspace C:\Program Files (x86)\Jenkins\workspace\DownStream-UpStream\SonaTest > C:\Program Files (x86)\Git\bin\git.exe rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > C:\Program Files (x86)\Git\bin\git.exe config remote.origin.url https://github.com/singhbad/Bruce.git # timeout=10 Fetching upstream changes from https://github.com/singhbad/Bruce.git > C:\Program Files (x86)\Git\bin\git.exe --version # timeout=10 using GIT_ASKPASS to set credentials BruceGit > C:\Program Files (x86)\Git\bin\git.exe fetch --tags --progress https://github.com/singhbad/Bruce.git +refs/heads/*:refs/remotes/origin/* > C:\Program Files (x86)\Git\bin\git.exe rev-parse "refs/remotes/origin/Metapool^{commit}" # timeout=10 > C:\Program Files (x86)\Git\bin\git.exe rev-parse "refs/remotes/origin/origin/Metapool^{commit}" # timeout=10 Checking out Revision 0f59d8b3fd664144cc55e85f44be7cdfab224831 (refs/remotes/origin/Metapool) Commit message: "Commit for metapool" > C:\Program Files (x86)\Git\bin\git.exe config core.sparsecheckout # timeout=10 > C:\Program Files (x86)\Git\bin\git.exe checkout -f 0f59d8b3fd664144cc55e85f44be7cdfab224831 > C:\Program Files (x86)\Git\bin\git.exe rev-list 0f59d8b3fd664144cc55e85f44be7cdfab224831 # timeout=10 [SonaTest] $ "C:\Program Files (x86)\Jenkins\tools\hudson.plugins.sonar.SonarRunnerInstallation\SonaScan\bin\sonar-scanner.bat" -e -Dsonar.host.url=http://localhost:9000 ******** "-Dsonar.projectBaseDir=C:\Program Files (x86)\Jenkins\workspace\DownStream-UpStream\SonaTest" INFO: Option -e/--errors is no longer supported and will be ignored INFO: Scanner configuration file: C:\Program Files (x86)\Jenkins\tools\hudson.plugins.sonar.SonarRunnerInstallation\SonaScan\bin\..\conf\sonar-scanner.properties INFO: Project root configuration file: NONE INFO: SonarQube Scanner 3.0.3.778 INFO: Java 1.8.0_73 Oracle Corporation (64-bit) INFO: Windows 10 10.0 amd64 INFO: User cache: C:\WINDOWS\system32\config\systemprofile\.sonar\cache INFO: Publish mode INFO: Load global settings INFO: Load global settings (done) | time=524ms INFO: Server id: AWBWzyK1kTiY3x_K-rPE INFO: User cache: C:\WINDOWS\system32\config\systemprofile\.sonar\cache INFO: Load plugins index INFO: Load plugins index (done) | time=266ms INFO: SonarQube server 6.7.0 INFO: Default locale: "en_IN", source code encoding: "windows-1252" (analysis is platform dependent) INFO: Process project properties ERROR: Invalid value of sonar.sources for App sonar.projectBaseDir= C:Program Files (x86)JenkinsworkspaceDownStream-UpStreamSonaTestNumberGenerator INFO: ------------------------------------------------------------------------ INFO: EXECUTION FAILURE INFO: ------------------------------------------------------------------------ INFO: Total time: 12.706s INFO: Final Memory: 40M/92M INFO: ------------------------------------------------------------------------ ERROR: Error during SonarQube Scanner execution ERROR: The folder 'C:Program Files (x86)JenkinsworkspaceDownStream-UpStreamSonaTestNumberGeneratorsrcmainjavacommkyong sonar.language=java' does not exist for 'App sonar.projectBaseDir= C:Program Files (x86)JenkinsworkspaceDownStream-UpStreamSonaTestNumberGenerator' (base directory = C:\Program Files (x86)\Jenkins\workspace\DownStream-UpStream\SonaTest) ERROR: ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging. ERROR: SonarQube scanner exited with non-zero code: 1 Finished: FAILURE
How to solve this error message?
-
Narayan Acharya over 6 yearsHi Badal! Please provide more context around your question like what are you trying and steps to reproduce this error. This will help other understand your question and bring in answers to solve your problem quicker. :)
-
Jim Garrison over 6 yearsPlease edit your post and re-paste the log, formatted as
CODE
. Blockquote destroys the layout and makes the log unreadable. If you want help, don't make it hard for people to help you. -
Badal Singh over 6 yearsHi Narayan,Jim Issue is solved for me now as I entered folder destination incorrectly..
-
Badal Singh over 6 yearsThough I have some confusion over "sonar.java.binaries=. sonar.scm.disabled=True" could you please explain?
-
-
Badal Singh over 6 yearsThanks, But problem was not with double \\ , It was due to wrong folder path I have mentioned in sonar.properties file
-
VonC over 6 years@BadalSingh OK. I have included your comment in the answer for more visibility.
-
Badal Singh over 6 years"sonar.java.binaries=. sonar.scm.disabled=True" do you have any idea about this property as I am newbie to sonar I am not aware of.
-
VonC over 6 years