|Re: [m2e-users] Run As Maven Build vs. Eclipse auto build|
On 07/14/2015 03:33 PM, Igor Fedorenko wrote:
Why do you need to run command line maven build on the same projects you've imported in m2e?
Basically because not all maven plugins are supported by/via m2e (i.e., missing connectors). And: unconditionally letting m2e invoke all these plugins during auto-build is a no-go (long running generators and such). So, after pulling big changes from VCS one full maven build needs to be triggered, after that Eclipse should take over. But they shouldn't both work at the same time :)
Personally, I only do this when I need to verify my changes didn't break command line build, in which case I just don't touch eclipse while the build is running.
I'm not sure if not touching is sufficient. Assume you have Eclipse configured so that it refreshes resources using native hooks, then any generated source files may trigger an auto-build in Eclipse, no?
There is no better workaround and I am not even sure what that workaround might be, given overall Eclipse workspace approach, where Eclipse wants to know all details about all resources all the time.
Could m2e just disable auto-builds while performing a maven build via Run As ...? Alternatively, if m2e can figure out all projects involved in such a build, could it actually acquire a scheduling rule for all affected projects?? I'm not sure which would be better. cheers, Stephan PS: and @Bruno: I'm aware that running maven *outside* Eclipse voids any warranties made inside Eclipse :)
Back to the top