You are viewing a plain text version of this content. The canonical link for it is here.
Posted to m2-dev@maven.apache.org by Trygve Laugstøl <tr...@inamo.no> on 2004/08/11 08:03:31 UTC

Re: [mojo-dev] Proposal for changes in the mojo interface

On Wed, Aug 11, 2004 at 03:29:25PM +1000, Brett Porter wrote:
> Sounds good to me. I remember liking this previously, but since it has
> been discussed before, it might be worth trawling around for the reason
> Jason went with the other design.
> 
> I must have misunderstood the original design. I was under the
> impression that the request and response were subclasses of the standard
> one, allowing typesafety for the individiual fields, if not the request
> object itself.

I'm not sure I understand what you are talking about, but the idea is that
from mavens side you have execute( request, response ), and from the mojos
side you have execute( ... ). 

Maven itself will never have any real knowledge of the details of a mojo
exept the set of parameters and expressions for those.

> 
> Does this mean there could be multiple execute methods with different
> parameters?

It could be, but it's really not something we want. If you have a set of
nearly equal mojos it's easy to make a common base class for the mojos.
This is already done, in particular in the modello plugin.

Having this requirement makes it easy to write mojos, it's clean without
any fuss.

--
Trygve

> 
> Cheers,
> Brett