05 February 2018

The question « Should the meta files related to an IDE be committed in the git repository? » is a never-ending fight. According to Aurelien Pupier, the answer to this question is YES (Talk from 2015 - slides and video). I totally agree with him, because settings files like org.eclipse.core.resources.prefs, org.eclipse.jdt.core.prefs, org.eclipse.jdt.ui.prefs or org.eclipse.m2e.core.prefs can contain valuable configuration information that will be shared between all Eclipse IDE users working on the project: code formatting rules, save actions, automated code cleanup tasks, compiler settings…

Enable project specific settings

Even today a lot of people still prefer not to have the IDE metadata files in their git Repository. This means that every coworker needs to configure his IDE and more important everybody needs to keep the configuration in sync with the team over the time.

In both cases (having the settings files in your repo or not), the eclipse-settings-maven-plugin can be interesting for you. The idea is to use maven in order to replicate the same prefs files across multiple maven modules. This way you can distribute the prefs file if they are missing in the git repository. An other use case is the distribution accros multiple teams (for example at organization level).

The source for the settings file is a simple maven artifact located in a maven repository. With a single maven command, you can synchronize the prefs files.

Using eclipse-settings-maven-plugin to copy prefs files

If you wants to see how the setup looks like, you can refer to my sync-eclipse-settings-example page and the associated GitHub project. I have updated it in order to use the latest version published last week by my former colleagues at BSI Business Systems Integration AG.


Post source on GitHub