2008/12/18 Luke Patterson <[email protected]>

> For most situations, you could consider the plugin artifact to be
> prez-layer.  You are using the mojo injection mechanism and maven api
> to gather input for the utility-artifact/wrapped-tool to process.
>
> Is that consistent with what you were saying Stephen?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
Sort of.

The key point is that the plugin has the Mojo... the annotations will be
injected into the Mojo... the Mojo's execute method then passes the
parameters to the worker class... the worker classes *do not* extend
AbstractMojo or any kind of Mojo.... if fact it's as if they don't know
about Mojo at all... otherwise were back to the same problem again.

Put the worker classes in a separate jar, leave the classes extending
AbstractMojo in the plugin, and have the plugin depend on the worker classes
jar.

Examples of this pattern would be in some of the plugins (I suspect the
enforcer and resources plugins would be good examples)

-Stephen

Reply via email to