We have a project that was structured like so:
my-app/
├─ bar/
│ ├─ sonar-project.properties
├─ foo/
│ ├─ sonar-project.properties
├─ sonar-project.properties
We’ve moved all of the packages (foo
and bar
in this case) to a new packages
directory, like so:
my-app/
├─ packages/
│ ├─ bar/
│ │ ├─ sonar-project.properties
│ ├─ foo/
│ │ ├─ sonar-project.properties
├─ sonar-project.properties
When we run Sonar scans run in our CI environment, I get this output
07:15:35 [xx-xx-master] $ /home/xxxxxxx/sonar-cli-5.0.1/bin/sonar-scanner -Dsonar.host.url=https://xxxx.com ******** -Dsonar.projectBaseDir=/home/xxxxxxx/workspace/xx-xx-master
07:15:35 INFO: Scanner configuration file: /home/xxxxxxx/sonar-cli-5.0.1/conf/sonar-scanner.properties
07:15:35 INFO: Project root configuration file: /home/xxxxxxx/workspace/xx-xx-master/sonar-project.properties
07:15:35 INFO: ------------------------------------------------------------------------
07:15:35 INFO: EXECUTION FAILURE
07:15:35 INFO: ------------------------------------------------------------------------
07:15:35 INFO: Total time: 0.017s
07:15:35 INFO: Final Memory: 8M/80M
07:15:35 INFO: ------------------------------------------------------------------------
07:15:35 ERROR: Error during SonarScanner execution
07:15:35 java.lang.IllegalStateException: The base directory of the module 'bar' does not exist: /home/xxxxxxx/workspace/xx-xx-master/bar
07:15:35 at org.sonarsource.scanner.cli.Conf.setModuleBaseDir(Conf.java:195)
07:15:35 at org.sonarsource.scanner.cli.Conf.loadModuleConfigFile(Conf.java:187)
07:15:35 at org.sonarsource.scanner.cli.Conf.loadModulesProperties(Conf.java:152)
07:15:35 at org.sonarsource.scanner.cli.Conf.loadProjectProperties(Conf.java:126)
07:15:35 at org.sonarsource.scanner.cli.Conf.properties(Conf.java:60)
07:15:35 at org.sonarsource.scanner.cli.Main.execute(Main.java:70)
07:15:35 at org.sonarsource.scanner.cli.Main.main(Main.java:62)
07:15:35 ERROR:
07:15:35 ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
I’ve run with the -X
switch, as well as -Dsonar.log.level=DEBUG
. Neither of these switches did anything.
I initially tried setting sonar.projectBaseDir=packages
in the root config file, but then realized that wasn’t what I wanted. So I tried sonar.sources=packages
. I feel that should have worked. What can I try next? How can I actually get debug output?
SonarQube v9.9.4 (build 87374)
I think it’s deployed via Docker. I can check if this fact is really important
Thanks in advance!