Monday, February 4, 2008

Managing Eclipse Plugins Installations

As a user and fan of Eclipse IDE for the past 4 years, I would say that I've become in loved with the performance, scalability and easy of use of this IDE.

How it manages its plugins is quite amazing, just decompressed the package inside its corresponding "eclipse/plugins or eclipse/features" directory and restarting the IDE will be enough for having the plugin already installed in your workspace.

But I must say that such great architecture has a huge disadvantage, since inside those directories are tons of predefine plugins which are available with the default eclipse installation, it's become hard to keep track of all you post-installation plugins and it gets worse when you make an IDE upgrade i.e. (from Eclipse 3.1 to Eclipse 3.2) you get on the need to install all those cool plugins you downloaded for your development environment once again or imagine you want to upgrade an existing plugin manually, that can be really troublesome!

Digging on the Internet, found an interesting article posted by IBM on 2003 called:
Put Eclipse features to work for you.

Where one on its topic it how to organize all your plugins outside the "Eclipse" installation directory, arrange them in a non-intrusive way so you can upgrade them or remove them easily.

Lets focus on that topic:

First use a clean copy of Eclipse with no other installed plugin, you can choose the flavor you want from the
Eclipse Download Center and place it on "C:\eclipse" or "~/home/eclipse" or "/opt/eclipse" where ever you want on you Disk architecture :D

Let’s assume it’s installed on "C:\eclipse" for the simplicity of the example.

Now, lets prepare our plugins repositories:

In any place of your hard drive create the following directories which will hold your plugins structure, in my case I have: "D:\javarelated\eclipseplugins\jbostool\eclipse", for this example I’ m installing the new set of JBOSSTool plugins for my Eclipse 3.3, after doing this uncompressed all you plugins there, since each plugins knows where it must be installed (plugins or features directory) you will end with the following structure:

"D:\javarelated\eclipseplugins\jbostool\eclipse\plugins"
"D:\javarelated\eclipseplugins\jbostool\eclipse\features"

Ok, guys we are almost done, lets now link them together (The fresh Eclipse Installation and you newly plugins repository", move to your eclipse installation directory and create a new directory name it as "links" i.e.: "C:\eclipse\links" and using your favorite Text editor create a file with the name you like but it must have the ".link" suffix, on this example I created: "jbosstool.link" containing the following line:

path=D:\\javarelated\\eclipseplugins\\jbostool

Please watch the double “\” here.

And we are done, make sure you restart you eclipse with the -clean argument to get any new plugins loaded and have happy coding.

2 comments:

Unknown said...

Sounds useful, normally i see the new eclipse version as a calling for me to search for newer or better plugins then the ones i have. since i have neer been rushed into migrating eclipse to a new version i don't give it to much mind.

For those guys out there that like to be on the bleeding edge and have no time to go plugin hunting, it sounds like a good solution, same practice as in linux.

Li said...

I have a suggestions for those managing multiple plugins. Create your own eclipse update site. This could not be any more simple than just creating a folder in your hard drive and extracting plugins into this folder. Then from eclipse go to help->software updates-> find and install-> add local site, search for the folder and Wala!!! your very own update site that can used as a plugin repository. You can use the manage configuration to uninstall and configure. Or just revist your local update site after extracting new plugins for updating existing plugins.