This document provides detailed information for developers that wish to compile and make changes to the Openfire source code.
For additional developer resources, please visit: http://www.igniterealtime.org. The Openfire build process is based on Apache Maven. Visit the Maven website for more information.
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:
export JAVA_HOME=/usr/local/jdk1.8
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.
source .profile
The JAVA_HOME variable should now be configured correctly.
set JAVA_HOME=c:\jdk1.8
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.
The Openfire build process uses Maven, so that tool must be installed and configured on your computer. First download Maven from: https://maven.apache.org. Next, follow the usage instructions.
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.
Finished!
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.
mvn clean
Description:
Cleans all artifacts of the build process.
mvn compile
Description:
Builds Openfire components (including plugins) into the target directory of each module.
mvn test
Description:
Builds Openfire components, and runs all unit tests.
mvn package
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.