I'm writing a plugin that is executed for each module in a multi-module build. I want to inject the same instance of a custom class into each mojo invocation so that I can share the resource. How is this done? I create the custom class and tried injecting it into my mojo class with the following annotation: * @component role="com.example.ResourceToBeSharedAcrossModuleMojos" * @required
However, I get the following exception: "Component descriptor cannot be found in the component repository: com.example.ResourceToBeSharedAcrossModuleMojos." I'm familiar with Spring and IoC in general, but I'm unfamiliar with Plexus and the maven lifecycle. What is the proper way of achieving this? I basically want the class in question to be a singleton and have the same instance injected into each mojo; otherwise, I'll have to create property in the mojo, but I don't like that approach. Thanks for any help! ==John
