Eclipse M2E modifies org.eclipse.wst.common.component

I have a multi-module Maven Java project (WAR) in Eclipse. It depends on many other Java projects. We check our .settings directory in the original control, because there are a lot of manual settings there.

One of the files in .settings is the org.eclipse.wst.common.componentone that also manually set the settings. However, Eclipse is constantly modifying this file based on what underlying JAR projects a developer opens in Eclipse. I believe this does this to help accomplish the “workspace resolution” of these artifacts.

However, the result of this situation is that Eclipse is constantly modifying that org.eclipse.wst.common.component, and the developers are constantly fixing this to control the source and fighting for it with each other. Leaving these files out of source control does not work, because there are too many manual settings specific to each project.

I assume this is a design error in Eclipse to have a file that combines project settings and user settings together! If anyone has an idea of ​​how to better deal with this problem, that would be great. Be that as it may, Eclipse-M2E simply does not work to develop a team for complex projects if each developer has EXACTLY the same Java projects loaded ....

+4
source share
1 answer

I agree that this particular file is problematic ... If it is damaged, the workspace is likely to crash, and if it is missing, nothing will work. But it does not contain anything that cannot be created from scratch when re-importing the project ...

I think the best solution is to check in a file using a "full" workspace, and then make sure that future changes are ignored.

If you need to make a “real” change, download the full workspace, do whatever you need, and then don’t ignore the file, register and ignore it again.

  • Eclipse Git: Team-> Advanced-> Suppose it has not changed.

  • Git: git,

:

git update-index --assume-unchanged the-file
git update-index --no-assume-unchanged the-file

, m2e jar/project, . , .

+1

Source: https://habr.com/ru/post/1663518/


All Articles