Reputation: 4334
Please help me understand or possibly stop Eclipse churn. I'm developing a webapp structured as a collection of Maven modules: 3 jars, 1 war. I'm using Eclipse mars j2ee, it has m2e version 1.6.3.20160209. Almost every time I switch branches and eclipse reopens my projects, the jar projects take an update to the file .settings/org.eclipse.wst.common.component and git says "hey file changed". These projects seeing the change are NOT war package type, they are jars. The file contents are trivial like this:
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="jarProjName">
<wb-resource deploy-path="/" source-path="/src/main/java"/>
</wb-module>
</project-modules>
Thanks in advance.
UPDATE to respond to comments about ignoring all Eclipse dot files:
Ok probably the o.e.w.c.component file is safe to ignore in jar projects.
However, we have chosen to share via git clean .project and .classpath files (e.g., using Java execution environments, not path on local machine). This usually saves time. We waste a lot of time fighting Eclipse/m2e odd behaviors :(
Upvotes: 2
Views: 775
Reputation: 4334
One year later a half answer: I did not find a way to stop the churn, instead we ignore the churn by excluding all IDE metadata from the git repo. The Maven (m2e) plugin does a good job at importing projects, it recreates the .classpath, .project and .settings/ files at import time. So a new developer can clone, import and be all set.
@HDave makes the point that some settings cannot be ignored due to m2e limitations. Please post details about those settings. That issue has not burned us yet, I guess we are not using any of those settings.
Upvotes: 0