2009/8/14 Benjamin Bentmann <benjamin.bentm...@udo.edu>:
> Stephen Connolly wrote:
>>
>> An alternative mechanism is to add empty methods to AbstractMojo which
>> are invoked pre-reactor, pre-module, post-module and post-reactor...
>
> The problem I see here is that the core can't tell whether these methods are
> just empty or actually doing something. But for the sake of performance, we
> definitively don't want to make useless calls into mojos, considering the
> processing time for calculating and injecting configuration, setting up
> class loaders and so on. And also, I don't think that reflection or bytecode
> analysis should be employed here to check the hook methods for contents. A
> quick glance at the mojo descriptor should be sufficient to tell how a mojo
> is supposed to interact with the lifecycle.

Well we could use annotations to define if the methods are to be
invoked... but then you get issues around property values being
injected into the pom as the build progresses and (potentially)
invalidating the mojo's configuration between invoking the pre-build
and invoking the bound phase.

So then you end up deciding to store your plugin's state in either the
session, or a static member (which the classloader fun might render
invisible on you when invoked a second time)

of course storing info in the session could result in corruption if
another plugin uses the same session key

ahh feck, lets just throw all of maven 2 out and invent a new build
system from scratch, we'll call it naven ;-)
>
>
> Benjamin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to