How to share Eclipse configuration over different workspaces
Solution 1:
Sharing eclipse specific settings across workspaces:
- Go to
${old_workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings
- Copy everything under the above directory to
${new_workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings
This is going to make sure that the ${new_workspace}
is having the same configuration as the ${old_workspace}
Hope this helps. Update in case of any issues.
Solution 2:
Another option is export/import:
- From your existing workspace,
File->Export...->General->Preferences
, check Export all, and choose file to save them to (prefs.epf for example) - Startup Eclipse in a new workspace,
File->Import...->General->Preferences
, choose your file (prefs.epf), check import all
That worked great for the original author of this tip: he had his code formatting, code style, svn repos, jres preferences imported.
Edit: On Eclipse Juno this works poorly. Some preferences silently do not carry over such as save actions.
Solution 3:
It's a relatively new project, but it looks like Eclipse Oomph was created for exactly this reason. Through this tool you can create a unique configuration that can be shared with others. I have not used it (yet), but am planning to:
https://projects.eclipse.org/projects/tools.oomph
Solution 4:
I had to work on multiple workspaces simultaneously and there were a lot of preferences to be set each time I create a new workspace. I created a template workspace and created all the the required settings in that template workspace.Whenever I create a new workspace, I create a simlink of the {new_workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings
to point to {template_workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings
. So, when you edit any preference in any of the workspaces, it will be replicated across all other workspaces.
I created this function alias in my .profile so that once I create a new workspace, I run this function in my command prompt with my new workspace name as argument so that the link is created.
function eclset(){
present_dir=`pwd`;
cd {parent_to_workspace}/$1/.metadata/.plugins/org.eclipse.core.runtime ;
rm -rf .settings ;
ln -s {parent_to_workspace}/template/.metadata/.plugins/org.eclipse.core.runtime/.settings .settings;
cd $present_dir;
}
Solution 5:
You can actually set many project specific settings that can be checked into source control. For small projects, this works really well. For larger projects, we decided to have a single file that we used for all of our projects and checked into a separate "assets" project that maintained things that developers needed to get started working on our project. This also included things like licenses and other required files.