powered by Jive Software

How do I build 4.6.0

I am trying to update my build from 4.5.4 to 4.6.0 but I am not sure how to build it. I could build 4.5.4 using the makefile in the root of the tarball with scl enable rh-maven35 make, but the 4.6.0 tarball does not contain a makefile or mvnw or mvnw.cmd, so I am a bit at a loss.

It also looks quite different from the Github 4.6 branch.

That Makefile is confusing. I feel that we should remove it.

Building Openfire from source needs just a couple of steps

  • Make sure your computer has a JDK version 8 or 11
  • Make sure your computer has Apache Maven (some semi-recent version should do)

In the root of the source folder, issue this command: mvn clean package

That’s it.

Afterwards, you’ll find a distribution that is ready for execution in distribution/target/distribution-base/

During development, I often do this:

mvn clean package && ./distribution/target/distribution-base/bin/openfire.sh -debug -demoboot

This will:

  • clean up artifacts from any previous build
  • compile and create a distribution of Openfire
  • start Openfire in ‘demo’ mode (gives you an admin/admin account, as well as two user accounts: john/secret and jane/secret on a domain that’s named example.org
  • start Openfire allowing a debugger to be attached.

The problem is that the tar.gz sources at the download page do not contain a makefile or anything to do with maven.

The tar.gz that you link to is a pre-compiled archive. There is no need to build anything from that.

If you want to build the project from source, you’ll need to get the sources from Github. There’s a src archive in each Openfire release that’s provided there(for example: https://github.com/igniterealtime/Openfire/releases/download/v4.6.0/openfire_src_4_6_0.tar.gz), or you can simply check out the code from the corresponding git tag.

My misunderstanding. That worked fine. Thanks.

1 Like