On Fri, Jun 26, 2009 at 10:48 PM, alexischr<ale...@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-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to