Recently I’ve realised that for all the host of materials there have been on XPages, there are not the same amount of materials for OSGi Plugin investigation. John Dalsgaard and John Cooper have blogged some, but most of the blogs tend to focus on building plugins. Indeed that’s also the focus of my upcoming session with Christian Guedemann at IBM ConnectED.

But that doesn’t tend to be the way I’ve learned things. I tend to look at examples, pick them apart, see what they’re doing etc. To do that, you need to look at the code in an appropriate development environment (not Domino Designer!) and, even better, be able to run them in debug. There are now a number of examples of XPages OSGi plugins available, but getting to grips with them has been further complicated by a recent shift towards using Maven for projects. Those of us who have been working with plugins for a while are getting to grips with that, but we’ve often got there through fumbling and are still getting to grips with it all. So there’s not been much documentation. So for someone downloading an XPages OSGi plugin from OpenNTF, it’s hard to understand why one plugin works in one way and another in another way, what’s best practice and what the differences are.

Consequently, I’ve decided to start on a series aimed at those who want to take a look at plugin code and see what it does; those who have never built an OSGi plugin and are not ready to do so; those who just want to investigate.

In the process I’ll cover Eclipse, forking projects, source control, importing projects, Maven, Tycho, building projects, creating update sites and debugging.

First, one caveat. If you’re using source control in XPages or want to debug Java code, I’ve long been of the opinion that you really need to be running a local development server. NSFs running in your local Notes data directory aren’t an appropriate route for building an application that needs security and authentication. If you’re building or reviewing OSGi plugins, it’s even more critical to be running a local development server. As far as I’m aware you cannot debug OSGi plugins running in a local database. If you want to use them in a local database, importing them into Domino Designer is not enough; youo need to physically copy the plugins into a different file location for Domino Designer’s local preview to use them. Obviously this is not an acceptable approach for enterprise development, nor is dynamically loading OSGi plugins from a user’s PC – everything falls over if that person’s PC is switched off or not on the network! I would strongly recommend installing a local Domino server and I will certainly be raising the licensing issue of that at IBM ConnectED next month.

Contents

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top