How to share Eclipse project preferences among users?

We have several developers on the team, the source code is managed using Mercurial DVCS.

The .metadata folder .metadata not under source control.

The problem is that when you configure project dependencies (banks, user libraries, source code paths, etc.) they are stored inside the .metadata folder, namely in .metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.jdt.core.prefs

Since this file is not controlled by DVCS, all developers need to repeat the project setup process again. For a new developer on the team, this is a major headache.

My question is, is there a reasonable procedure for exchanging this type of data? I'm new to the Java and Eclipse worlds, so maybe I'm missing something really basic here.

EDIT

The problem is that I used User Libraries which are defined globally and therefore are not shared. Using External Jars solves the problem because they are written in the .classpath file inside the project directory.

+8
java eclipse configuration
source share
3 answers

You can specify many properties in the project configuration, and not in the global configuration. Just right-click on the project and select "Properties" there.

Eclipse then saves the preferences in the project directory, and not in the workspace configuration directory. Thus, you can register the configuration of a specific project in your SCM and share it with other project members.

+4
source share

You can prepare the settings file ( .epf ) and save it in the original control. Each developer will need to import this file once into each workspace that they use.

To create a settings file, go to File → Export ... → General information; Settings Then you can edit the .epf file so that it contains only the settings that you want to provide to everyone. This way you can share code style preferences, formatting options, compiler warnings, JRE settings, user interface settings, and many other types of Eclipse preferences.

+6
source share

The short answer would be: use an IDE-independent project customization tool like Maven .

Another possibility is ant , a very powerful building tool. Recently, a little out of fashion.

Sharing buidfiles used by such a tool is a very common option in order to make your project settings and dependencies manageable and easily portable.

Sharing the metadata created by the eclipse, on the other hand, is discouraged, because the eclipse stores dependencies with its absolute patches (not sure if this is always the case, but definitely sometimes), and these corrections can cause a number of problems (first hand). Especially if they are shared between OS borders (win-linux)

+4
source share

All Articles