I have no idea if this is possible with M2 plugins as I haven't done a
whole lot in that area yet. The first one should be relatively easy --
make a mojo and assign it to the validate phase. But I'm not sure you
can assign a mojo to the "last" phase when you don't know which one
that will be especially when an error occurs. Someone else who knows
more about plugins will hopefully reply with more info here.

So instead, I might suggest using the %HOME%\mavenrc_pre.bat and
%HOME%\mavenrc_post.bat files (assuming you're on Windows) specified
in mvn.bat to do the start/stop process you're looking for. Or if
you're not on Windows, the "mvn" batch script seems to look for and
execute /etc/mavenrc and $HOME/.mavenrc before calling the Maven java
process. But it does not have a corresponding "post" call.

Alternatively, I would override the entire mvn batch file stuff with
my own, perhaps call it mymvn, and do the start/stop stuff in mymvn,
and then call the real mvn batch file from there. This seems easiest
to me, especially if you're only developing on one common platform.

Wayne

On 2/9/07, Thorsten Vogel <[EMAIL PROTECTED]> wrote:
Good day everyone,



i want to achieve the following in a m2 plugin but i don't know if it is
possible (i am new to m2 but i have used m1 intensively in the past):

1. One plugin/mojo must be executed when the build starts.
2. One plugin/mojo must be executed when the build ends and it needs to
detect if there were build errors.

How would i accomplish this?

Is there a way to register a build lifecycle listener somehow or can i
achieve this with mutiple plugins?



Thank you in advance!
Thorsten


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to