After upgrading SonarJava plugin to 5.8 (15699) Sonar can't analyze class anymore (guava issue)

To me, the problem come from the plugin AEM-Rules-for-SonarQube
This plugin adds custom rules to SonarJava, but wrongly declare SonarJava as its “base” plugin.

The concept of “base” plugin was used long time ago when we used to split functional plugin into multiple technical plugins (aka ecosystem). In the end all plugins declaring the same “base” are loaded in the same classloader.

AEM plugin is embedding Guava 19, and so is conflicting with Guava in SonarJava. Removing the “basePlugin” attribute should fix the issue, since the two plugins will have their own classloader.

A plugin providing custom rules doesn’t need to declare a base plugin.

1 Like