Currently Being Moderated

Building the IM Gateway Plugin

VERSION 5

Created on: Aug 9, 2007 12:50 PM by Daniel Henninger - Last Modified:  Apr 8, 2008 1:36 PM by Daniel Henninger

The IM Gateway plugin, unlike the plugins bundled with Openfire, is developed separately from Openfire itself.  As a result, it is built alongside Openfire instead of "inside" it.  This document explains the process of setting up the IM Gateway plugin for development or even just building.  The IM Gateway plugin is quite a bear in terms of size, which is one of the many reasons it stays separate from the Openfire main line.

 

 

Setting Up The Standard Build Environment

 

First, choose a directory that will contain both the openfire and gateway checkouts.  Inside that directory, you will need to check out Openfire:

 

 

This assumes that you wanted to check out trunk.  You will need to adjust the SVN URI appropriately if you are  checking out something other than trunk.  The only important part of this is that you are checking it out into a directory named openfire.

 

After this you will need to check out the IM Gateway plugin next to it:

 

 

It matters less what you call the gateway directory.  Again, adjust SVN URI to whatever version you are intending to check out.

 

 

IntelliJ

 

If you are using IntelliJ with Openfire, typically you will have checked out the source and opened a file named Openfire.ipr in build/projects.  To add the IM Gateway plugin to your environment, perform the following quick steps:

 

  1. Open the Openfire.ipr project normally

  2. Go to Preferences

  3. Go to Project Settings

  4. Go to Modules

  5. Click the little + symbol to add a New Module

  6. Import existing module

  7. Navigate to the gateway source you checked out, and into build/projects

  8. Choose Gateway.iml

  9. You're done!

 

You also may want to add the ant build file so:

 

  1. From the main Ant Build window, click on the little + symbol to add a new ant build file

  2. Navigate to the gateway source you checked out, and into build

  3. Choose build.xml

  4. You're done!

 

At this point you have the Gateway source included, and can build the plugin using the ant task "jar" under the Gateway ant category.  Pretty slick, huh?  I encourage other non-stock plugin authors to follow a similar model as it helps keep things separated from the main line.  Feel free to copy the build.xml and modify it to your needs of course.

 

 

Building From The Command Line

 

To build from the command line, simply go into the gateway/build directory and type "ant jar".  It should trigger an openfire build, build the IM Gateway plugin, and copy the plugin into openfire/target/openfire/plugin.

 

 

Building from IntelliJ

 

I generally build the IM Gateway plugin by choosing "jar" under the IM Gateway category in Ant Build.

Average User Rating
(0 ratings)




There are no comments on this document

More Like This

  • Retrieving data ...