You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by alexischr <al...@thenull.net> on 2009/06/26 15:18:19 UTC

Newbie question - Resuming lifecycles

Hello everyone,

My team has been evaluating Maven as a solution for a data-processing
pipeline. I've created a prototype of what our project would look like, and
it includes a Mojo plug-in and a custom default lifecycle.

My question regards resuming failed runs: If a goal inside the plugin throws
an exception and fails, will the entire lifecycle be repeated when I
re-execute the lifecycle? Will it know not to execute previous successful
goals, or do I need to design each goal so that it checks if its output
already exist?

Please keep in mind that I'm using a custom packaging/lifecycle, if it makes
a difference. Resume is an important function in our case, since the
pipeline has many fail points out of our control, and some goals can take
days to execute.

Thank you!
-- 
View this message in context: http://www.nabble.com/Newbie-question---Resuming-lifecycles-tp24220125p24220125.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Newbie question - Resuming lifecycles

Posted by Barrie Treloar <ba...@gmail.com>.
On Fri, Jun 26, 2009 at 10:48 PM, alexischr<al...@thenull.net> wrote:
>
> Hello everyone,
>
> My team has been evaluating Maven as a solution for a data-processing
> pipeline. I've created a prototype of what our project would look like, and
> it includes a Mojo plug-in and a custom default lifecycle.
>
> My question regards resuming failed runs: If a goal inside the plugin throws
> an exception and fails, will the entire lifecycle be repeated when I
> re-execute the lifecycle? Will it know not to execute previous successful
> goals, or do I need to design each goal so that it checks if its output
> already exist?

Maven will *re-run* the lifecyle.
Any goals that successfully worked before the exception was thrown
will be re-run.
It is therefore important to ensure those goals have some sort of
smarts to avoid regenerating artifacts that do not need it.
i.e. timestamp checking, etc.

> Please keep in mind that I'm using a custom packaging/lifecycle, if it makes
> a difference. Resume is an important function in our case, since the
> pipeline has many fail points out of our control, and some goals can take
> days to execute.

Have a look at the release plugin, especially the prepare goal.
This plugin manages its own "lifecycle" stages within that goal.
They are not real maven lifecycles but rather resumable steps of the
prepare goal.
You may be able to leverage of that knowledge to allow you to build
your mojo in a similar manner.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org