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 07/14/2015 04:25 PM, 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.

I see now that I was day dreaming when I hoped that m2e could
figure out the scope of a build :)

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.

I don't think it's a common scenario to explicitly run a maven build,
and concurrently work on non-m2e projects expecting them to be build
incrementally. I think it's fair to consider a workspace as read-only
while an explicit maven build is running.

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.

But a maven build could create new Java files which then are
picked up by the Java builder, no? I guess that's the
kind of conflict I was observing.

If you really need to, you can always manually disable auto-build for the duration of your launch.

That's what I currently do and recommend and that's what creates
the users' impression that Eclipse and Maven don't harmonize well.
I figured that many users would be happy if m2e provided more help
in avoiding such conflicts.

best,
Stephan



Back to the top