Version Numbering and your plug-ins

Eclipse has a very easy to use and extensible version system.  When I send someone a patch or want to test my code on another machine I usually go through the entire exercise of creating an Eclipse update site and installing the features like a normal user would.  With Lotus Notes 8.5.1 and above I actually create a Widget to install the features and plugins because that is how the end user will do it.  Well, at some point you know all of that works and you may just want to get a new binary out without going through the widget install and restart method.  This method, which I am about to walk you through, assumes you will launch with the “-clean” option to clear any cache in the product (Notes, Sametime, etc), so you can just copy the new plug-in jar file over the existing one.  So you would shut down the product, export the plug-in, and relaunch the product with “-clean”.  For instance, I launch Lotus Notes on my development machine with the following options:

C:notesframeworkrcprcplauncher.exe -console -clean -config notes -vmargs -Duser.language=en -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8020

That not only sets up my Notes to accept patches but it also gives me the error console and the ability to attach to it with a debugger on port 8020.

The key is to make sure you match the version of the file exactly – otherwise Eclipse will get all confused.   The version is usually in the plug-in name like “com.acme.plugin_1.0.0.201010122134“.  When you compile an update site, if your plug-in and features have their versions set to use “.qualifier” the date and time are inserted where .qualifier is specified.  In the case of our plug-in the version looks like this:


I use the export method in the Eclipse PDE.  I export the plug-in using the right click on the project name and select “Export”, I then choose the “Deployable plug-ins and fragments” option:

Exporting a Plugin

The key is on the next couple of tabs.  You select the place you want to place the jar file and then on the next tab you can tell the export process the exact date and time to use:

Setting the date and time

This will now overwrite the existing jar file (which will have the same name) with the newly compiled jar file containing the changes.  You can even export this file directly to an Eclipse update site and replace a plugin without generating a whole new update site.

Two references are key to understanding how versions work with plug-ins and features.  You should check out these two articles on the Eclipse wiki and SDK help:

Version Numbering

Using Version Qualifiers

Dojo woes went away with Dojo 1.5

I learned a big lesson creating the attachment viewer as shown in my previous post (Attachment Viewer on Steroids).  I was struggling to use the slide show user interface.  For the life of me I could not figure out why it was not working and from the samples provided everything I was doing seemed right.  Out of the blue I had a late night vision to look at the Dojo version I was using.  I often dream of JavaScript and Dojo in my deep sleep – so that was nothing new.  The next, I realized I was using Dojo 1.4.  I decided to change the one line of code to point to the Google Dojo 1.5 CDN:

Viola!  The rendering worked just by changing that one line!  I am not sure what I was doing right or wrong but I do know that this was very frustrating and wanted to pass it on.  If you are using “dijit.layout.StackContainer” with “dijit.layout.ContentPane” and are seeing some strange things then try Dojo 1.5.

I really wanted to dive on the two versions of Dojo to write about what exactly was the problem but I have been too swamped to take that dive.  Hopefully this helps out others.

Slide Show