Backup Eclipse plugins and settings

2019-01-10 15:02发布

问题:

I'm using Eclipse and have plenty of plugins installed and configured to my needs. Is there any good way to backup these plugins and the configuration of them. I want to be able to replay these plugins in futures eclipse version (as long as they are compatible) and on different PCs.

I know I could simply archive the whole eclipse/ folder, but I find this a little inelegant.

回答1:

There are two parts to your question:

  1. Copying your settings between Eclipse installs
  2. Copying your installed plugins between Eclipse installs

#1 is easy to do. You can export your Eclipse preferences from the File -> Export... -> Preferences. The resulting file contains all of your preferences for each installed plugin. It is portable between Eclipse installs and versions.

#2 is not really the "Eclipse" way of doing things. It is possible, but you need to structure your installed plugins differently. Rather than using the standard update manager to install your plugins, you can use the dropins folder. What you need to do is to copy every feature and plugin that you want to be shared across multiple installs into a zip file with the following structure:

eclipse/
    features/
    plugins/

Then you can unzip the file into the dropins folder of all the Eclipses that you want.

More information on dropins: http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/p2_dropins_format.html



回答2:

P2 installation replication is a tool to help you backup installed plug-ins, you could install it via Eclipse Marketplace.

According to the settings of configuration, most of them are persisted in your workspace. So you could backup your workspace/.metadata folder.



回答3:

While inelegant, archiving the entire eclipse folder is also insufficient. I think you want to archive the following:

  • The entire eclipse installation folder.
  • The .metadata folder of every workspace.

By doing this, you will not only preserve the plugins and their settings, but you will also preserve an eclipse installation in which you know your plugins work.



回答4:

I've made small service for myself to synchronize Eclipse settings. Currently it supports Java Templates + Bash Aliases. Could be useful for someone else.

http://confsync.com