Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] m2e and maven-resources-plugin

EclipseBuildContext is used during full/clean build only, during
incremental build EclipseIncrementalBuildContext is supposed to be used.
You need to find what triggers full/clean build, which unfortunately is
not easy at the moment.

--
Regards,
Igor

On 2013-02-13 3:36 AM, Paul Hardaker wrote:
Hi there,

I’m hoping you can help me here since I’ve been scratching my head over
this for a while now!

We are seeing some undesirable behaviour in eclipse as regards our maven
projects. For no apparent reason our projects often get cleaned and
re-built, which can be a big time waster.

I’ve been investigating this and think I’ve tracked it down to the m2e
integration for the maven-resources-plugin. If I debug the resources
plugin, org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering
calls the
org.eclipse.m2e.core.internal.builder.EclipseBuildContext.hasDelta()
methods – but I see these are hard coded to return true!

I think the upshot of what happens is every time eclipse decides it
needs to copy maven resources, they get copied to target/classes, which
then triggers eclipse into a build cycle. This is mentioned here
http://wiki.eclipse.org/M2E_compatible_maven_plugins “Out-of-sync files
under target/classes or target/test-classes can also cause unexpected
JDT "clean" builds”

Are you able to offer any advice regarding this?

Many thanks,

Paul

*Paul Hardaker*

*Software Developer*



Back to the top