19 May 2014

Domino OSGI (Part 2) - Configuring Eclipse for XPages OSGI Plugins

In my previous post I described how to initially setup eclipse in preparation for creating your own XPage plugins. This will then allow you to deploy your Plugins from eclipse and debug when necessary.

To use your own controls you will need to create a plugin and install this into Domino Designer and onto the Domino Server. My preference is wrap the plugin up into an update site and install as described in this article: How to install the new XPages Extension Library with the Eclipse Update Site database

One of the issues with the above is that if you are constantly making changes to the control (eg. adding new properties) you need to continually export them to an update site, import the new update into Designer and restart, which after a few times becomes frustrating.
So to get around the issue i make a couple of changes to my local Designer configuration as described below.

Open your notes directory, navigate to the framework directory, create a new folder and name as you feel suitable (e.g. jmc-plugins). Inside the newly created folder create another folder called eclipse.
Next navigate to the framework\rcp\eclipse\links folder and create new text file named again as you feel suitable ensuring it has the extension ".link" (e.g. jmc-plugins.link)
Inside your newly created text file add the following:
  path=C\:/Program Files (x86)/IBM/Notes/framework/jmc-plugins
ensuring the path is to your newly created directory.

What the link file does is tells Designer to look in the new folder to load any additional plugins/features which will then allow you to export you plugin directly into this folder.

Unfortunately this will not work just yet as Designer by default does not allow you to plugins in this way, to resolve this you need to edit the following file
Change the transient attribute on the config tag to false and replace all the instances of policy="MANAGED-ONLY" to policy="USER-EXCLUDE"

For these settings to take effect you will need to completely close Notes/Designer/Administrator and re-open. I have read that you need to use the following when restarting Designer using the command "designer.exe -RPARAMS -clean". I can't remember doing this myself.

No comments:

Post a Comment