Another way to work around this, is to have eclipse target a different
directory than maven, as documented here:
http://docs.codehaus.org/display/M2ECLIPSE/Project+FAQ#ProjectFAQ-HowtoconfigureMavenprojecttouseseparateoutputfoldersinEclipse
Even though this is documented to help keep maven from interfering with
eclipse, It certainly works in the reverse to keep eclipse from
interfering with maven :-)
--Leif
Karl M. Davis wrote:
Actually, I think I may have just found a workaround:
1. Window --> Preferences --> Java --> Compiler --> Building
2. Under "Output folder", uncheck "Scrub output folders when
cleaning" projects.
This seems to keep Eclipse from "mopping up" the targeted resources.
My guess is that (since my projects all have inter-dependencies
between them) that every time I rebuild one project, the ones that
depend on it get rebuilt, Maven/Eclipse gets confused as to who's
doing what, and Eclipse (for some reason, as the last thing that
happens) scrubs the target folders of all rebuilt projects. Disabling
that scrub (with the settings above) prevents it from happening.
It's worth noting that this settings change prevents Eclipse from ever
cleaning up deleted resources, etc. To work around that, add an
Eclipse Run target that just runs the "mvn clean" goal on your
projects. Run that, and then "Project --> Clean" whenever you need a
full rebuild.
Best regards,
Karl M. Davis
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email