Thursday, August 13, 2009

Exporting eclipse plugins locally from one instance to another

As an ardent fan of Eclipse IDE I always try to use the latest available release to see what all new cookies are there for me.

With this the only painful thing I've faced till now is every time I've to install/download all of my plugins like Maven, SpringIDE, Subversive etc. Many provides local archive installation and many needs to be updated every time using Eclipse. This is very time consuming and also some times not possible in cases where I do not have internet connectivity for what so ever reason.

Recently I downloaded Galileo and again faced the same problem as I described above and this time I discovered that Eclipse has an inbuilt feature to import plugins from any of the existing eclipse install to new install without need to go to update site or download it from the internet. Here I'll display how to do this...
  1. Download latest Eclipse from download page and start the IDE.
  2. Setup a local repository to point to your old-eclipse-install's plugin download directory. Eclipse stores all downloaded plugins to <eclipse-install-directory>/p2 directory. Below are the steps to setup new local repository with Galileo
    1. Select Install New Software... from Help menu
    2. Click Add... button to add new repository. See below snapshot...
    3. Click on Local... button and select the p2 directory of your existing eclipse install. For e.g. if your existing eclipse is installed at C:/eclipse then browse for folder C:/eclipse/p2
    4. Provide appropriate name of your choice for this new repository and click OK.
    5. You should see the list of plugins available in your existing eclipse install. In case you do not see it then uncheck Group items by category checkbox. See below snapshot...

  3. Once your local repository is set, select all the plugins you want in your new install and click Next and then Finish.
  4. This will calculate the dependencies and then install the selected plugins from your existing/old install.
  5. Done.
Cheers !!!
- Jay
Disclaimer : This is a personal blog and all content represent what I think and it does not advocate/support/advertise any other person/company. I do not earn money or intended to do so with this blog or any of the contents the blog hosts (except the google ads which you see). If I post something here that you find helpful, that's wonderful. Just in case, if I say something stupid, the stupidity is mine, and mine alone and I can not be held for anything if you fall for such stupidity :-). I cannot be held responsible for any kind of damage that may be caused by downloading or viewing the files or information provided herewith. Anybody and everybody can use/refer the contents of this blog at their own will and of course at own risk. There is no need for any kind of approval of the author. Although it would be great if feedback is left for any such usage to the author.