Jenkins build failed complaining about Groovy plugin for SQ 7.9.2

  • which versions are you using
    7.9.2

  • what are you trying to achieve
    Run the analysis, but fails with below error:
    [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project Test: org.sonar.plugins.groovy.codenarc.CodeNarcSensor has unsatisfied dependency ‘class org.sonar.plugins.groovy.foundation.GroovyFileSystem’ for constructor ‘public org.sonar.plugins.groovy.codenarc.CodeNarcSensor(org.sonar.api.profiles.RulesProfile,org.sonar.plugins.groovy.foundation.GroovyFileSystem)’ from org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@6aea99e7:75<[Immutable]:org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@3330f3ad:262<[Immutable]:org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@629cbb1:43<| -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

  • what have you tried so far to achieve this
    Installed SQ 7.9.2 in EKS
    Created jenkins job to run sonar-scannar analysis with a code in SCM

It appears you upgraded SonarQube to 7.9.2 but may have an outdated version of the community-supported groovy plugin installed. I’d suggest checking the Marketplace under Administration within your SonarQube instance to see if you can update this and potentially other stale plugins.

Hi Jeff,

Thankyou for your quick response.
The only plugin I see in marketplace=> updatesonly is checkstyle and upgraded to the latest to 4.32

However, I still getting the same error.

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project Test: org.sonar.plugins.groovy.codenarc.CodeNarcSensor has unsatisfied dependency ‘class org.sonar.plugins.groovy.foundation.GroovyFileSystem’ for constructor ‘public org.sonar.plugins.groovy.codenarc.CodeNarcSensor(org.sonar.api.profiles.RulesProfile,org.sonar.plugins.groovy.foundation.GroovyFileSystem)’ from org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@5135b8a3:75<[Immutable]:org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@6d4b09c7:262<[Immutable]:org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@5f58ac11:43<| -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Please Advice!

Unfortunately, it doesn’t look like the sonar-groovy plugin has seen a new release since 2017, and isn’t currently compatible with SonarQube 7.9. You’ll have to uninstall it, or could consider contacting the plugin maintainer (or even taking over development if you’re inclined!). It appears pull requests have been submitted to make updates, but were never accepted by the current maintainer.

Thankyou, ended up uninstalling existing groovy plugin and installed this plugin.

All looks fine so far…