|Re: [m2e-users] Run As Maven Build vs. Eclipse auto build|
Maven launches are not tied to projects, but are executed in a specified directory, which might span several eclipse projects or none at all.There's no way to see which projects are affected, since maven plugins have basically full access to the hard drive and might change anything outside of their maven working dir.You also cannot disable auto-build for specific projects, it's a workspace-global state. In my opinion, disabling it during maven launch is too invasive, since it would be disabling builds of non-m2e projects.However, m2e does honor the auto-build state, so you should not expect any m2e builds to be triggered by file refresh hooks (even on pom files in 1.6.0+), if it's off.If you really need to, you can always manually disable auto-build for the duration of your launch.2015-07-14 16:48 GMT+03:00 Stephan Herrmann <stephan.herrmann@xxxxxxxxx>: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 duringauto-build is a no-go (long running generators and such).So, after pulling big changes from VCS one full maven build needsto 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 Eclipseconfigured 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 viaRun 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,StephanPS: and @Bruno: I'm aware that running maven *outside* Eclipse voids anywarranties made inside Eclipse :)_______________________________________________m2e-users mailing listTo change your delivery options, retrieve your password, or unsubscribe from this list, visit--Regards,Anton._______________________________________________m2e-users mailing listTo change your delivery options, retrieve your password, or unsubscribe from this list, visit
Back to the top