Hi all,
> OK, now I get it. Thanks. I'll have a look at the code and come back if
> I still have some questions.
I did have a look a the animal-sniffer-maven-plugin. Very interesting.
One thing that I do not understand, however, is how to obtain access to an
implementation of ToolchainManagerPrivate (besides @component
ToolchainManagerPrivate). As far as I can see, the plugin only declares a
dependency on the ToolchainManager (w/o Private) component.
/**
* @component
*/
private ToolchainManager toolchainManager;
Still, the plugin later on continues to call
toolchainManager.getClass().getMethod("getToolchainsForType", String.class,
MavenSession.class), a call which can only succeed (instead of throwing a
NoSuchMethodException) if the toolchainManager component actually
implements ToolchainManagerPrivate instead of only ToolchainManager.
If I do the above in my own code, however, toolchainManager is of class
DefaultToolchainManager instead of DefaultToolchainManagerPrivate. So why
does it work in the BuildSignaturesMojo? What am I missing?
Best wishes,
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]