For the XPages community, this week has seen some significant announcements and releases on OpenNTF. Indeed, I don't think it's hyperbole to say this is the most significant addition of functionality since the Extensibility API and the Extension Library itself. Covering everything was a webinar yesterday reviewing progress on the Extension Library this year. If you missed it, the webinar is available on replay.

The Extension Library was at the core of the announcements. The latest release has come hot on the heels of bringing the RDBMS components from ExtLibX into the core Extension Library. This release brings another significant project into the core, namely Bootstrap4XPages to offer responsive web design. It uses Bootstrap 3.2.0 and jQuery 2.1.1, although jQuery can also be used without needing to use a Bootstrap theme. One point to note is that in the current release the Select2 control is not included, but this release of the Extension Library can co-exist with Bootstrap4XPages. This all means extension to the Application Layout wizard. On top of all this additional functionality, there are about 100 bug fixes.

The most significant announcement around the Extension Library is that the source code is also available on GitHub. This is significant because it is now easier to fork the Extension Library code AND merge in changes as and when they're released. Not only that, but pull requests can be submitted, allowing the community to get involved in fixing and enhancing the Extension Library. The slide outlining the process is below.

A picture named M2

But there has also been a significant change in the structure of the project, namely using Maven as a build management system for continuous integration. This means the Eclipse projects that comprise the Extension Library have been reorganised and need to be installed in Eclipse differently. It also means that an additional package of the Domino runtime jars needs to be available.

This is the reason behind the other major release on OpenNTF this week from the IBM XPages developers, namely the IBM Domino Update Site for Build Management. And as that wasn't enough additional functionality, there will also be another project coming soon to OpenNTF to allow localization translations to be processed and submitted.

Hopefully many developers are already familiar with plugin development, but many will not be familiar with Maven. So it's worth taking a few moments to cover how to set up your environment.

1. The first step is to install Eclipse for RCP and RAP Developers. The good thing about Eclipse is you can install multiple versions. I'd strongly recommend the latest version, Luna, because the relevant Maven plugins are automatically installed.
2. Install XPages SDK for Eclipse RCP project from OpenNTF into Eclipse. This is an Update Site, so it's the same underlying process to install in Eclipse as it is to install the Extension Library (or any other OSGi plugin) into Domino Designer. The main difference is that instead of File > Application > Install, you select Help > Install New Software.... Once installed and Eclipse has restarted, you will need to point to your Notes and Domino install locations in Window > Preferences, ensuring the tick is enabled to automatically create JRE. Then switch to the Domino or Notes JRE, changing the compiler settings when prompted to Java 1.6. By choosing the relevant JRE, it can be used for debugging and compiling OSGi plugins. Without it, any use of Domino classes (e.g. Session, Database etc) would throw errors.
3. In Preferences, go to Target Platform and click Add. Select Template and choose Domino Install Target or Notes Install Target.
3. Download the IBM Domino Update Site for Build Management and unzip it to C:\UpdateSite. If you can't unzip it to that location, you can unzip it to a different location.  But you'll need to amend any references in projects to it. The only one for the Extension Library is in pom.xml in the project.
4. For building in Eclipse you will need some additional plugins for Maven and Tycho. The good news is all you need is already installed in Eclipse Luna or gets installed when you install the Extension Library.

Now you're ready to debug or extend the Extension Library.
5. Open the Extension Library on GitHub.
6. Click the Fork button and fork into a GitHub repository of your own.
7. Pull down a local repository from your GitHub repository. Most Domino developers use SourceTree for interaction with GitHub. You can clone a repository and point to the URL of your GitHub repository.
8. Import the plugin projects into Eclipse. There is a significant difference for importing any plugins that use Maven (they're easy to spot because they will include a pom.xml in each plugin). You need to select File > Import, then choose Maven > Existing Maven Projects.
9. When prompted to setup Maven plugin connectors, do so. These are the tycho plugins required for Eclipse to kick off the maven build process.
10. To build, just right-click the project and select Run As > Maven Install. All projects in the Extension Library will be built directly in Eclipse.

notes.jar is a restricted jar file. So if it's not already been changed, you will need to go to Window > Preferences and go to the Java > Compiler > Errors/Warnings and in the Deprecated and restricted API section change Forbidden reference (access rules) from Error to at the highest Warning.

comments powered byDisqus