Metadata should not be managed in source control, they contain mostly data relevant to your workspace.
The only exception is the .launch
xml files (launcher definition).
They are found in
[eclipse-workspace]\.metadata\.plugins\org.eclipse.debug.core\.launches
And should be copied into your project directory: when your project is refreshed, those configurations will be displayed in the "Run configuration" dialog.
That way, those launch parameter files can be also managed into the SCM.
(Warning: do uncheck the option "Delete configurations when associated resource is deleted" in the Run/Launching/Launch Configuration preference panel: it is common ot soft-delete a project in order to import it back again, to force a reinitialization of the eclipse metadata,... but this option, if checked, will removed your detailed launch parameters!)
project-dir/.project
project-dir/.classpath
project-dir/.settings/*
should be in your SCM.
The goal is that anyone can checkout/update his/her SCM workspace and import the eclipse project into the eclipse workspace.
For that, you want to use only relative paths in your .classpath, using linked resources.
Note: it is better if project-dir
refers to an "external" project directory, not a directory created under the eclipse workspace. That way, the two notions (eclipse workspace vs. SCM workspace) are clearly separated.
As ipsquiggle mentions in the comment, and as I have alluded to in an old answer, you can actually save the launching configuration as shared file directly in your project directory. All launching configuration can then be versioned like the other project files.
(From the blog post Tip: Creating and Sharing Launch Configurations from KD)