I am not sure this is entirely accurate. In many/most cases Eclipse
should be able to make very good guess about projects affected by the
build based on launch base directory. I don't think this functionality
belongs to m2e, however, it should be provided by jdt-debug and enabled
by m2e via some sort of API.

--
Regards,
Igor
 
 
On Tue, Jul 14, 2015, at 10:25 AM, Anton Tanasenko wrote:
> 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 <[email protected]>:
>> 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 :)
>>  
>> 
_______________________________________________
>> 
m2e-users mailing list
>> [email protected]
>> 
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
>> https://dev.eclipse.org/mailman/listinfo/m2e-users
>  
>  
>  
> -- 
> Regards,
> Anton.
> _________________________________________________
> m2e-users mailing list
> [email protected]
> To change your delivery options, retrieve your password, or unsubscribe from 
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/m2e-users
 
_______________________________________________
m2e-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users

Reply via email to