When executing the following command in maven i am getting following errors.
mvn sonar:sonar -Dsonar.branch.name=${BranchName} -e
Error messages:
17:29:16 [INFO] SCM collecting changed files in the branch
17:29:16 [INFO] ------------------------------------------------------------------------
17:29:16 [INFO] BUILD FAILURE
17:29:16 [INFO] ------------------------------------------------------------------------
17:29:16 [INFO] Total time: 12.433 s
17:29:16 [INFO] Finished at: 2021-02-17T11:59:16+00:00
17:29:16 [INFO] Final Memory: 46M/790M
17:29:16 [INFO] ------------------------------------------------------------------------
17:29:16 [INFO] [jenkins-event-spy] Generated 17:29:16 [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar (default-cli): Unable to load component class org.sonar.scanner.scan.filesystem.ProjectFileIndexer: Unable to load component class org.sonar.scanner.scan.filesystem.FileIndexer: Unable to load component class org.sonar.scanner.scan.filesystem.MetadataGenerator: Unable to load component class org.sonar.scanner.scan.filesystem.StatusDetection: Unable to load component class org.sonar.scanner.scm.ScmChangedFiles: NullPointerException → [Help 1]
17:29:16 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar (default-cli)
I have tried updating the sonar-plugin and spring to latest version.
Currently used version:
- SonarQube: 7.9.1,
- Sonar-maven-plugin: 3.6.0.1398
Any idea where the problem is?