Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] Run As Maven Build vs. Eclipse auto build

On Tue, Jul 14, 2015, at 11:53 AM, Stephan Herrmann wrote:
> On 07/14/2015 05:22 PM, Igor Fedorenko wrote:
> > You can map these mojos to run during project configuration only and/o
> > clean project build only. You will still need to manually trigger
> > configuration update or clean build to get resources regenerated, but I
> > think this is better than running command line build.
> Thanks, that's an interesting approach which I will try soon.
> Yet from looking at
> it seems that this approach may not work for *all* maven plugins
> (I'm looking at the requirement to use BuildContext ...).

use of BuildContext is needed to refresh changed resources in workspace
and communicate error messages. assuming you have auto-refresh and can
live without error markers, you can just map the mojos to execute on
configuration update.

you can also "wrap" mojo execution in an eclipse plugin that can do
required pre/post processing. I can show you examples if you are

> To double check, when you discourage command line builds, do you
> include m2e's "Run As ... > Maven Build ..." feature?

yes. "Run As ... > Maven Build ..." just runs Maven in external jvm.
same as running "mvn" on command line... more or less.


Back to the top