Scans fail with plugin related errors when using private repositories

  • Version of SonarQube: Data Center Edition Version 9.4 (build 54424)
  • Version of Scanner: 4.7.0.2747 (Using latest docker image)

Scanners show errors when certain plugins are installed on SonarQube. Specifically, we see this message with Checkstyle:

Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@2dcd0e41-org.sonar.scanner.bootstrap.ScannerPluginRepository': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Fail to download plugin [checkstyle]. Not found.

We see the checkstyle plugin (10.2 and other versions) in both the public maven repository as well as our private repository. The plugin downloads just fine when there is no settings.xml file present in the local .m2 directory. The plugin fails to download with 404 when we have the settings.xml file. We are not overriding anything in our settings.xml file so Scanner should fall back to public maven repo to find the plugin, but it does not. We also have the artifact in our own repository so it shouldn’t have been a problem to begin with.

I’m not sure if this is a configuration issue on sonarqube side or not. If anyone’s had a similar experience, please let us know.

Hey there.

The scanner isn’t downloading plugins from Maven, it’s downloading them from your SonarQube server.

As a Data Center Edition customer, you certainly have access to SonarSource Commercial Support, and I would really recommend reaching out to them where you can share full logs/configuration information in privacy.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.