OpenJMS is built using Maven. Maven 1.0.2 must be used.

If you are familiar with Maven, skip forward to Building OpenJMS

New to Maven?

Maven is a build tool that aims to simplify the process of developing Java projects.

If you don't have Maven installed, download a copy from http://maven.apache.org/, install it, and put its bin/ directory in your path.

Third party JARs

OpenJMS uses third party JARs which maven will automatically attempt to download from a central repository and cache locally.

However, due to licensing restrictions, not all JARs can be automatically downloaded - these need to be done manually. In particular, this applies to JARs distributed by Sun (i.e, the JDBC, JMS, JNDI and JTA JARs).

When maven encounters a JAR it can't download, it will output a message like:

The build cannot continue because of the following unsatisfied dependency:

jdbc-2.0.jar; version override doesn't exist: 2.0 (try downloading from

The following table indicates the name of the product, the download archive name, and the path the resulting JAR(s) must be copied to. The JAR(s) may need to be extracted and/or renamed.

Product Download Copy to
JDBC 2.0 Optional Package Binary jdbc2_0-stdext.jar ${maven.repo.local}/jdbc/jars/jdbc-2.0.jar
JMS 1.0.2b API Documentation, Jar, and Source jms-1_0_2b.zip ${maven.repo.local}/jms/jars/jms-1.0.2b.jar
JNDI 1.2.1 jndi-1_2_1.zip ${maven.repo.local}/jndi/jars/jndi-1.2.1.jar
JSSE 1.0.3_03 software and documentation jsse-1_0_3_03-gl.zip ${maven.repo.local}/jsse/jars/jsse-1.0.3.jar
JTA 1.0.1 jta-1_0_1B-classes.zip ${maven.repo.local}/jta/jars/jta-1.0.1.jar

In the above, ${maven.repo.local} represents maven's local repository. By default, this is ${user.home}/.maven/repository

Building OpenJMS

The following assume that maven is run from the root of the OpenJMS source tree, unless otherwise specified.

Building the OpenJMS JARS

To build all of the OpenJMS JARS:

maven -Dmaven.test.skip o:build

NOTE: maven.test.skip prevents the unit tests being run. Need to do this until:

  • The http unit tests can be run automatically. These require openjms-tunnel to deployed to a running Tomcat installation.
  • A mechanism is set up to only run unit tests if something has changed.

Installing the server

To install the server:

maven -Dmaven.test.skip o:install

By default this installs the server to the install/ directory. To override this behaviour, define install.dir in distribution/build.properties

Building a single module

To build a single module, cd to the directory holding the module and run maven from there. E.g, to compile the openjms-net module:

cd modules/net
maven java:compile

To install it to the local repository to make it available to other modules:

maven jar:install

Building the documentation

To build the website, run:

maven o:site

The website will be generated to the target/docs/ directory.


The following custom goals are available:

Goal Description
o:build Executes the default build for all projects
o:clean Deletes the target directory in all projects
o:site Generates the website
o:install Builds and installs the OpenJMS server
o:dist-bin Generates a binary distribution
o:dist-src Generates a source distribution