I am attempting to write an extension to the SonarQube checkstyle plugin. I would like to use dependency injection to wire required dependencies. From what I can see (documentation seems to be lacking) SonarQube uses plexus as its IoC container. In my custom plugin I have added the necessary dependencies to generate a plexus components file (confirmed packaged in the plugin jar at "/META-INF/plexus/components.xml"). However when I start the server it issues an error stating dependencies can't be found:
org.picocontainer.injectors.AbstractInjector$UnsatisfiableDependenciesException:
foo.SonarCheckstyleRuleRepository has unsatisfied dependency 'interface foo.MyInterface'
for constructor 'public foo.SonarCheckstyleRuleRepository(
foo.MyInterface,foo.DifferentInterface)'...
Is there additional configuration required in the plugin (outside of the components.xml) to register the components within the SonarQube server? Do I need to package the plexus classworlds library with the plugin? Is there something additional required to integrate with "pico container"?