Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to share Eclipse project preferences between users?

We have several devs in the team, the source code is managed using the Mercurial DVCS.

The .metadata folder is not under the source control.

The problem, is that when I configure project dependencies (jars, 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 managed by DVCS, all the devs need to repeat the project configuration process all over again. For a new dev in the team this is a major head ache.

My question is there a sane procedure to share this kind of configuration data? I am new to the world of Java and Eclipse, so maybe I am missing something really basic here.

EDIT

The problem is that I have been using User Libraries, which are defined globally and thus are not shared. Using External Jars solves the problem, because these are recorded in the .classpath file inside the project directory.

like image 752
mark Avatar asked Nov 29 '11 12:11

mark


People also ask

Where are Eclipse preferences stored?

Preferences are stored in the workspace of your application in the . metadata/. plugins/org. eclipse.

Can you share Eclipse project?

If you have a project in your Eclipse workspace that you want to share, use the Share Project wizard to put the project under Engineering Workflow Management source control and make it part of a component in a repository workspace.

How do I access Eclipse preferences?

To invoke this dialog, click on the Window menu and select the Preferences menu item. The preference pages are organized by category. You can locate a preference page by expanding the nodes of the tree in the left hand side of the dialog box.


1 Answers

You can prepare a preferences file (.epf) and store it in source control. Each developer will have to import this file once in each workspace they're using.

To create a preference file, go to File → Export... → General → Preferences. You can then edit the .epf file, so that it only contains the preferences you want to share with everyone. This way you can share code style preferences, formatting options, compiler warnings, JRE settings, UI tweaks, and many more types of Eclipse preferences.

like image 79
Eli Acherkan Avatar answered Sep 24 '22 08:09

Eli Acherkan