You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Laird Nelson <lj...@gmail.com> on 2009/12/18 17:01:22 UTC
Mojo configuration question--share object?
I have a Mojo I'm developing.
As part of its configuration it takes two objects.
I'd like to use the same instance of an object for the value of both
parameters.
How do I do this?
For example, suppose I have an object, C, that implements both A and B.
And suppose my mojo has a private A a field, and a private B b field.
I'd like, somehow, to create a C, configure it, and pass it in as the value
of both the a and the b field.
I suspect that I need to use the @component annotation somehow--this sounds
like depending on a Plexus component--but I'm not sure how to get C
registered as a Plexus component from a Mojo's configuration.
Thanks,
Laird