Creating a local Eclipse Update site

After having to work out how to do this again, I thought I’d give a step-by-step guide to creating an Eclipse Update site populated by existing plugins. For this example, I’ll create an update site for the Weblogic Eclipse plugin

Create the update site

If you’ve already got one of these, skip this step. Otherwise, you’ll need to create a directory on a webserver somewhere. This is referred to afterwards as $update-dir.

In this is directory, you’ll need to create a file called ‘site.xml’. Because you don’t have any thing there yet, this is pretty empty:

<?xml version=”1.0″ encoding=”UTF-8″?>
<site>
</site>

Create two directories underneath this one called plugins and @features.

Install the plugin locally

Download the plugin and install it locally, by copying it to $ECLIPSE_HOME/plugins; the plugin is called com.bea.eclipse.weblogic_1.1.1

After this step, quickly start Eclipse and make sure the plugin is working. If it’s not, pack up and go home. 🙂

Transform the plugin

Eclipse Update sites can’t take plugin directories, unfortunately. So we need to package the plugin into a JAR. It is important to make sure you preserve the Manifest information. The command I used was:


jar cvMf com.bea.eclipse.weblogic_1.1.1.jar -C com.bea.eclipse.weblogic_1.1.1

Copy the jar file to $update-dir/plugins

Create a feature definition.

Odds are the plugin hasn’t come with a feature definition, so you need to make one of those. It’s not hard, however.

In $update-dir/features, create a directory with the same name as the plugin, e.g. com.bea.eclipse.weblogic_1.1.1. Then create a file called feature.xml in this new directory. The contents of the file look like this:




This is a plugin to control a local Weblogic instance from
within Eclipse.



None mentioned








Back out to the $update-dir/features directory and turn the directory you just made into a JAR. e.g.
bc. jar cvf com.bea.eclipse.weblogic_1.1.1.jar -C com.bea.eclipse.weblogic_1.1.1

After this you can delete the directory if you want.

Update the site.xml file.

You now need to publish the new feature by updating the site.xml file. The new file looks like this:



<description url="http:///eclipse-updates">
My Eclipse Update Server





Tools to control Application Servers


And that’s it. All you need to do now is point your Eclipse installation at the update site and download the feature (though you probably want to delete the locally installed plugin first).

Advertisements

Author: Robert Watkins

My name is Robert Watkins. I am a software developer and have been for over 18 years now. I currently work for people, but my opinions here are in no way endorsed by them (which is cool; their opinions aren’t endorsed by me either). My main professional interests are in Java development, using Agile methods, with a historical focus on building web based applications. I’m also a Mac-fan and love my iPhone, which I’m currently learning how to code for. I live and work in Brisbane, Australia, but I grew up in the Northern Territory, and still find Brisbane too cold (after 16 years here). I’m married, with two children and one cat. My politics are socialist in tendency, my religious affiliation is atheist (aka “none of the above”), my attitude is condescending and my moral standing is lying down.

5 thoughts on “Creating a local Eclipse Update site”

  1. Pretty informative site. The site helped me create and deploy an update site. However, when I release the next version of the plugin, the Update manager does not pick it up (I have made 2 entries in site.xml and have the resources for both the versions). Any idea what might cause this problem?

    1. It’s been nearly 10 years – the procedure is probably out of date.

      In particular, though, this post has suffered from being moved through 3 different blog platforms in that time. The ‘bc.’ in front is a formatting code, probably from when this blog was running on Movable Type.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s