Using Maven to build Openfire Plugins


i’'ve build a small Maven plugin to build Openfire Plugins. Its a mix of the maven-war-plugin and the Jetty JSPC plugin. Usage is quite simple, just add the plugin to your POM and set packaging to “openfire-plugin”.

Currently the plugin is available from SVN at

The site is available at


1 Like

You can actually use the maven assembly plugin - the following descriptor will create a deployable plugin.

Yes this will work for simple plugins but as you start using i18n, database scripts and JSPs you will start seeing the benefits of an all-in-one plugin

Very true - nice work btw.

Thanks a lot for this plugin!

Very nice

Thanks for the positive feedback.

As it seems to work not only for me, I’'ve released an official 1.0.0 version.

Grab it from SVN: ire-plugin-1.0.0/



I tried using this plugin with openfire 3.4.5 and successfully built a jar of my plugin but this jar does not deploy into openfire. Should this maven-plugin work with openfire 3.4.5?

I built the jar using the ant task from the openfire source code and using the maven-build-plugin.

Comparing the jars shows that the one built with maven-build-plugin has a different structure, Did the stucture of deploying jars change from openfire version 3.3.0 to 3.4.5 i wonder. As 3.3.0 is the openfire version the maven-build source code uses as an example.

Any advice?




I try to build maven openfire plugin.

While building plugin I get NullPointerException:

C:\test2\maven-openfire-plugin\tags\maven-openfire-plugin-1.0.1>mvn install

WAGON_VERSION: 1.0-beta-2

Building Maven Openfire Plugin


Downloading: .3/maven-buildnumber-plugin-0.9.3.pom

6K downloaded

Downloading: .3/maven-buildnumber-plugin-0.9.3.jar

13K downloaded

buildnumber:create {execution: default}

Storing buildNumber: null





at java.util.Hashtable.put(

at org.codehaus.mojo.buildNumber.BuildNumberMojo.execute(

at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.j ava:443)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecyc

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(De

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycl

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailure s(

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(Default

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExe

at org.apache.maven.DefaultMaven.doExecute(

at org.apache.maven.DefaultMaven.execute(

at org.apache.maven.cli.MavenCli.main(

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)

at java.lang.reflect.Method.invoke(

at org.codehaus.classworlds.Launcher.launchEnhanced(

at org.codehaus.classworlds.Launcher.launch(

at org.codehaus.classworlds.Launcher.mainWithExitCode(

at org.codehaus.classworlds.Launcher.main(

Total time: 10 seconds

Finished at: Mon Mar 10 21:33:00 CET 2008

Final Memory: 6M/12M

Any ideas what is wrong/how can I fix the problem ?



More reliable solution to use this plugin (thanks to Stefan).

First of all specify plugin repository in your pom.xml:

            <name>reucon public repository</name>

Secondly, specify when you want this plugin to be executed:


That is all. Simply run mvn clean package and you get ready for use openfire plugin.

P.S. One main assumption for usage of Stefan plugin: you must create src/main/webapp directory in your project structure, otherwise Stefan’s plugin won’t correctly assembly openfire plugin (plugin.xml won’t be copied)

Hi Temppost2,

I’m getting no luck with a build based on this POM, is it still valid?

I also tried navigating to the POM here: ven/plugins/maven-openfire-plugin/1.0.2-SNAPSHOT/maven-openfire-plugin-1.0.2-201 10225.211336-1.pom

and using that, but it fails with this error:

[INFO] Scanning for projects…


[WARNING] Some problems were encountered while building the effective model for com.reucon.maven.plugins:maven-openfire-plugin:maven-plugin:1.0.2-SNAPSHOT

[WARNING] ‘build.plugins.plugin.version’ for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 62, column 9

[WARNING] ‘build.plugins.plugin.version’ for org.apache.maven.plugins:maven-source-plugin is missing. @ line 69, column 9

[WARNING] The expression ${artifactId} is deprecated. Please use ${project.artifactId} instead.

[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.


[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.


[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.



[INFO] ------------------------------------------------------------------------

[INFO] Building Maven Openfire Plugin 1.0.2-SNAPSHOT

[INFO] ------------------------------------------------------------------------


[INFO] — maven-resources-plugin:2.6:resources (default-resources) @ maven-openfire-plugin —

[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!

[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!

[INFO] skip non existing resourceDirectory D:\Users\Mattlindsay\git\MattAndMark\openfire-plugin\src\main\resources


[INFO] — maven-compiler-plugin:3.1:compile (default-compile) @ maven-openfire-plugin —

[INFO] No sources to compile


[INFO] — maven-plugin-plugin:3.2:descriptor (default-descriptor) @ maven-openfire-plugin —


Artifact Ids of the format maven-___-plugin are reserved for

plugins in the Group Id org.apache.maven.plugins

Please change your artifactId to the format ___-maven-plugin

In the future this error will break the build.

[WARNING] Using platform encoding (Cp1252 actually) to read mojo metadata, i.e. build is platform dependent!

[INFO] Applying mojo extractor for language: java-annotations

[INFO] Mojo extractor for language: java-annotations found 0 mojo descriptors.

[INFO] Applying mojo extractor for language: java

[INFO] Mojo extractor for language: java found 0 mojo descriptors.

[INFO] Applying mojo extractor for language: bsh

[INFO] Mojo extractor for language: bsh found 0 mojo descriptors.

[INFO] ------------------------------------------------------------------------


[INFO] ------------------------------------------------------------------------

[INFO] Total time: 9.658 s

[INFO] Finished at: 2015-07-21T23:17:05+01:00

[INFO] Final Memory: 9M/31M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-plugin-plugin:3.2:descriptor (default-descriptor) on project maven-openfire-plugin: Error extracting plugin descriptor: ‘No mojo definitions were found for plugin: com.reucon.maven.plugins:maven-openfire-plugin.’ -> [Help 1]


[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.


[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1]