Hi,

I am interested in a method to avoid unnecessary work of lifecycle
phases if some defined criteria are met.

By 'unnecessary work' I mean not only the compilation of sources
(which javac seem to handle well enough), but also testing, packaging
(and possibly some cargo goals).

My first idea was to write a plugin, which would execute early enough
to perform the criteria check (for example, if there were any commits
to svn repository, if .ear artifact is missing, etc) and if possible -
terminate the lifecycle, when no actual work is required.

My problem with this idea is as follows:
- exceptions thrown out of the plugin can halt entire build process,
even the parent, aggregating project.
- runtime objects available to the mojo trough expressions (
'${session}' and '${executedProject}') don't seem to offer any method
to stop the build lifecycle of the current pom with success.
- ReactorManager class has a method 'registerBuildSuccess', but the
object itself don't seem to be available to plugins. I don't really
know if this method could do what I want...

My other idea, would be a plugin to alter the set of lifecycle phases
at runtime and remove all the unnecessary default phases, which would
result in avoiding their execution. But I don't know if such thing
could be accomplished with a plugin...


Thanks and Best Regards,
Bartosz Zoladkowski

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

Reply via email to