OpenJMS is built using Maven. Maven 1.0.2 must be used.
If you are familiar with Maven, skip forward to Building OpenJMS
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.
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 http://java.sun.com/products/jdbc)
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 |
${maven.repo.local}/jsse/jars/jcert-1.0.3.jar | ||
${maven.repo.local}/jsse/jars/jnet-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
The following assume that maven is run from the root of the OpenJMS source tree, unless otherwise specified.
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:
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
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 |