Thanks. It works when my package name is
Another question is about the guide: https://docs.sonarqube.org/display/DEV/API+Basics
Is the description wrong? because I tried
org.mycompany.<pluginKey>, it didn’t work.
Caused by: java.lang.ClassNotFoundException: net.xxx.sonar.g11n.api.Spelling (pluginKey is “g11n”)
It worked after I change
Exposing APIs to Other Plugins
The common use case is to write a language plugin that will allow some other plugins to contribute additional rules (see for example how it is done in the Java plugin). The main plugin will expose some APIs that will be implemented/used by the “rule” plugins.
Plugins are loaded in isolated classloaders. It means a plugin can’t access another plugin’s classes. There is an exception for package names ending with
<pluginKey>.api . For example all classes in a plugin with the key
myplugin that are located in
org.mycompany.myplugin.api are visible to other plugins.