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.
First, choose a directory that will contain both the openfire and gateway checkouts. Inside that directory, you will need to check out Openfire:
svn co http://svn.igniterealtime.org/svn/repos/openfire/trunk 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:
svn co http://svn.igniterealtime.org/svn/repos/gateway/trunk gateway
It matters less what you call the gateway directory. Again, adjust SVN URI to whatever version you are intending to check out.
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:
Open the Openfire.ipr project normally
Go to Preferences
Go to Project Settings
Go to Modules
Click the little + symbol to add a New Module
Import existing module
Navigate to the gateway source you checked out, and into build/projects
Choose Gateway.iml
You're done!
You also may want to add the ant build file so:
From the main Ant Build window, click on the little + symbol to add a new ant build file
Navigate to the gateway source you checked out, and into build
Choose build.xml
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.
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.
I generally build the IM Gateway plugin by choosing "jar" under the IM Gateway category in Ant Build.
There are no comments on this document