Openfire Plugin development and project dependencies

One of my former co-workers developed a nifty Open Source project. He asked me to write an Openfire Plugin that adds the functionality provided by that plugin to Openfire. As part of my work at Nimbuzz includes writing in-house Openfire plugins, I didn’t think that this was much of a problem. Writing the code wasn’t all that difficult, but after I return him the plugin.jar, he asked me a question I couldn’t answer straight away: “How do I put this in my SVN without adding Openfire itself completely?”

I’d like to find a way to make Openfire Plugin development less dependable on the entire Openfire project. Currently, the ‘easiest’ way of developing plugins that I’ve found is checking out the entire Openfire tree, and add my custom plugin code into that tree, and re-use the Apache Ant build file that’s included in the source.

Plugin development would be a lot faster if I didn’t have to merge my code with the Openfire project. I would really like to develop a plugin in a project different than the Openfire project itself. Instead, I’d like to have Openfire be a dependency of my plugin development - not part of it.

Has someone been able to do this? I noticed that Stefan created a Maven plugin that lets you use Openfire as a dependency inside the Maven project. I think this could be a good solution to my problem, but it has a drawback: As Openfire is not available in the public Maven repositories, this requires every developer or user to manually install Openfire. This defeats the purpose of Maven a bit, since every developer would have to update his local installation every time a new version of Openfire gets released.

Having Openfire in “the”, or alternatively “a” public Maven repository would be a big help here. I’m not sure if it is practical to add Openfire to “the” public Maven repositories, as this seems to require either a restructuring of the Jive SVN (…), or a lot of manual work for each release. An alternative would be to start a Maven repository hosted here on IgniteRealtime, and add some scripts to the deploy process of Openfire. This way, developers would only need to add that repository to their Maven configuration, and be done.

As you said, the easiest way to build the project is to just drop your source inside the openfire svn. I dont see how that requires you put all of openfire in your svn repo- svn allows you to have “external” links, so your repo would just grab from the igniterealtime.org server.

As far as trying to reduce the dependency a little, you might try taking just the build directory (ant files, etc) and using the compiled openfire release together. But in the end, you must have openfire to build openfire plugins, as that is just the way java works. Im not sure it makes much sense to build openfire plugins without openfire anyway.

Hi Guus,

you usually need only the openfire.jar file in your class path. Then “javac src/plugins/PLUGINNAME/src/java/org/jivesoftware/openfire/plugin/FILENAME.java” does work.

LG

I would really like to start with an igniterealtime.org maven repo.

It would makes the build process much smoother than it is now. As Guus said it would allow to simply define a dependency on the version of openifre to usee instead of having to integrate the plugin with a downloaded version of the openfire source. Updating a plugin for a new version just means a singe change in the maven descriptor of the plugin.

In addition you get nice IDE integration with the Eclipse IDE plugin or IDEA 7.

I wonder if other developers are still using ant using for their other projects?