2

I am using Jenkins 2.190.3 with Sonarqube 7.9.2 for doing build quality analysis.

When executing the following line in my jenkins job:

mvn -e sonar:sonar -Dsonar.branch.name=${ORIGIN_BRANCH_NAME}

I get this error message:

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar default-cli) on project application-demo-back: 
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.sonarsource.dotnet.shared.plugins.WrongEncodingFileFilter: 
org.sonarsource.dotnet.shared.plugins.WrongEncodingFileFilter has unsatisfied dependency 'class org.sonarsource.dotnet.shared.plugins.AbstractConfiguration' for constructor 'public org.sonarsource.dotnet.shared.plugins.WrongEncodingFileFilter(org.sonarsource.dotnet.shared.plugins.EncodingPerFile,org.sonarsource.dotnet.shared.plugins.AbstractConfiguration)' from org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@7a0e7ecd:278<[Immutable]:org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@67332b1e:43<| -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project application-demo-back: 
Unable to load component class org.sonar.scanner.scan.filesystem.ProjectFileIndexer

Any idea about where can be the problem?

My sonarqube instance has these plugins installed:

sonar-auth-oidc-plugin-1.0.4.jar
sonar-csharp-plugin-6.5.0.3766.jar
sonar-flex-plugin-2.3.jar
sonar-java-plugin-4.15.0.12310.jar
sonar-javascript-plugin-3.2.0.5506.jar
sonar-ldap-plugin-2.2.0.608.jar
sonar-php-plugin-2.11.0.2485.jar
sonar-python-plugin-1.8.0.1496.jar.old
sonar-python-plugin-2.5.0.5733.jar
sonar-scm-git-plugin-1.3.0.869.jar
sonar-scm-svn-plugin-1.6.0.860.jar
sonar-typescript-plugin-1.1.0.1079.jar
sonar-xml-plugin-1.4.3.1027.jar

I have tried to delete the data folder as mentioned here but nothing changed.

Zumo de Vidrio
  • 2,021
  • 2
  • 15
  • 33
  • Were you able to fix this? – Yazeed Sabri Mar 20 '20 at 16:59
  • @YazeedSabri Only avoiding the use of the parameter `-Dsonar.branch.name`, so unfortunately no :( – Zumo de Vidrio Mar 23 '20 at 08:11
  • I have solved my issue, can you share with me the bottom of the stack trace you get when running the analysis after adding the -X flag? Mine was due to some weird Git issue and I solved it by explicitly checking out the branch I want, regardless of what the checkout method did. – Yazeed Sabri Mar 24 '20 at 02:38

0 Answers0