If you are using sonarqube plugin in jenkins then you don’t need to give relative path of your workspace but you can pass sonar.sources=. and it will work or you can also change according to your requirement like src. For me it was working fine this way. I hope it helps.
Thanks Vicky, i was able to get that configured but now i am receiving a new error
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 0.765s
INFO: Final Memory: 9M/245M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: Not authorized. Please check the properties sonar.login and sonar.password.
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
WARN: Unable to locate ‘report-task.txt’ in the workspace. Did the SonarScanner succedeed?
WARN: Unable to locate ‘report-task.txt’ in the workspace. Did the SonarScanner succedeed?
ERROR: SonarQube scanner exited with non-zero code: 1