Building Kraken

The Kraken 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 Kraken plugin for development or even just building.

Setting Up The Standard Build Environment

First, choose a directory that will contain both the openfire and kraken 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 Kraken next to it:

It matters less what you call the kraken 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 Kraken 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 kraken source you checked out, and into build/projects

  8. Choose Kraken.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 kraken source you checked out, and into build

  3. Choose build.xml

  4. You're done!

At this point you have the Kraken source included, and can build the plugin using the ant task "jar" under the Kraken 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 kraken/build directory and type "ant jar".  It should trigger an openfire build, build Kraken plugin, and copy the plugin into openfire/target/openfire/plugin.

Building from IntelliJ

I generally build Kraken by choosing "jar" under the Kraken category in Ant Build.