This document provides detailed information for developers that wish to compile and make changes to the Openfire source code.
This documentation is divided into three sections:
You can get the Openfire source code by downloading a source distribution or by checking out the source code from CVS. Instructions for both options can be found on the source page.
Getting your machine ready for development requires a few steps. Wherever possible, instructions are provided for both Unix/Linux and Windows users.
Important! -- the Openfire build tool needs to know where Java is installed on your system. You must configure the "JAVA_HOME" environment variable to point to the correct directory. Instructions on how to set this variable for various platforms are as follows:
The value "/usr/local/jdk1.8" should be replaced with your actual Java directory. Be sure there are no spaces after the end of the directory name. Do not add an extra slash after the directory name.
The JAVA_HOME variable should now be configured correctly.
The value "c:\jdk1.8" should be replaced with your actual Java directory. Be sure there are no spaces between the "=" sign or after the end of the directory name. Do not add an extra slash after the directory name.
Now, invoke the build tool to compile the Openfire source code: mvn compile If the build tool is invoked correctly and Openfire compiles, you've correctly configured your copy of the Openfire source distribution.
Openfire conforms to the standard Maven build process. For a full list of the
commands please review the Apache Maven documentation. For more complete help
on several commands, read the documentation below.
To execute a build pahse, type
mvn "phase" where "phase" is
one of the keywords listed below:
mvn clean package.
When a phase is given, Maven will execute every phase in the sequence up to and
including the one defined. For example, when the 'package' phase is executed, the
'compile' and 'test' phases are also executed (but the 'clean' phase is not, unless
specified explicitly). Please refer to the Maven documentation for more details.
Description:Cleans all artifacts of the build process.
Description:Builds Openfire components (including plugins) into the target directory of each module.
Description:Builds Openfire components, and runs all unit tests.
Description:Builds Openfire components, runs all unit tests, and creates a distributable package in the distribution module. You can then launch Openfire using the scripts in distribution/target/distribution-base/bin.