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).
Hi Robert,
Your html is broken at https://twasink.net/blog/archives/2004/07/creating_a_loca.html
You have a reference to which should be <server>
Otherwise it is a very informative page.
This page doesn’t display in full in firefox, but switching to IE meant I could view it all
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?
CAn’t get past this step:
bc. jar cvf com.bea.eclipse.weblogic_1.1.1.jar -C com.bea.eclipse.weblogic_1.1.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.