Openfire provides ways to customize application code as well as the Admin console, while maintaining that code in a separate location from the distribution source. The base code and custom code are integrated during the build process.
Topics that are covered in this document:
To customize files, create the following file structure in your
openfireHome directory (where
all the source files are on your filesystem).
custom/conf directory, mirror the contents under the
Any files you place under
custom/conf will override the current conf files under conf
in the build. For example, to override the
openfire.xml config file, you would place a
openfire.xml file under the directory
Any files you place under the
custom/lib directory will be placed along side the other
jar files under the
openfire/lib/ directory. For example, if you require a 3rd party
jar file for use with changes you made under
custom/source/, you would place the
jar file in
custom/lib/ and it will be placed in the
lib/ in the build.
custom/source directory, mirror the contents under the
Any files you place under
custom/source will override the current source files in the build.
For example, to override the class
org.jivesoftware.openfire.Channel you would place a
Channel.java file under the directory
custom/webapp directory, mirror the contents of the
Any files you place there will override the current source files in the build. For example,
if you want to modify
src/web/login.jsp then add login.jsp to the directory
custom/resources/jar directory, mirror the contents of the
directory. Any files you place there will override the current source files in the build. These files will
be placed in the root of the generated Openfire.jar file.
custom/resources/nativeAuth directory, mirror the contents of the
directory. Any files you place there will override the current source files in the build.
Currently, overridden files will simply be included in the built war or jar files. We have not added functionality to bundle these changes in a separate jar file.
The texts that are used in the administration panel (as well as some other texts) are taken from various
translation files under the
src/i18n directory. To customize such a file, a file by the same name
can be added in the
custom/i18n directory. The build process will merge both files, which you to
add your own properties, as well as override existing properties, without the need to copy all properties
that aren't of interest to you.
Simply build the application as normal. You may need to run the
task for your changes to be picked up.