Building

Building OpenRegistry using Maven2

OpenRegistry provides extensive test coverage at all levels (unit, integration, and functional). Therefore building the application can take longer than expected.

Due to the functional testing of the RESTful API, the most recent versions of Java 5 and Java 6 should be used for building. The tests will FAIL if an older version is tested. The oldest version that we've tested that works are 1.5.0_19 and 1.6.0_13. Older versions MAY work, but we have not tested them.

Building OpenRegistry via the Maven2 system is simple. From within the PROJECT_HOME directory, execute the following command:

mvn clean package install
  • "clean" is optional and ensures that all previous artifacts have been cleaned up before generating new ones.
  • "package" generates the appropriate packages for the sub-module (i.e. war, jar, etc.)
  • "install" makes the sub-modules available from the local repository such that other sub-modules can see the new ones.

Updating License Information using Maven2

OpenRegistry uses the Maven License Plugin to manage the licenses on its files. The license header is stored in the PROJECT_HOME/src/etc/header.txt file.

To update the license, first change the header.txt file then execute the following command from within PROJECT_HOME:

mvn license:format

This will update licenses if the header.txt file has changed or if a file is missing a license. You can use this instead of remembering to add the header to each file. At some point, we may include this as part of the build process.

To check if the license has been applied, but not change any files, execute

mvn license:check

Generating the DDL for YOUR database

For testing purposes, you can rely on the sample web application to create the appropriate schema on demand. However, if you need the full DDL to show to DBAs, etc. a Maven plugin can be used to generate it.

To generate the DDL, execute the following command from within the openregistry-repository-jpa-impl module:

mvn hibernate3:hbm2ddl

By default, it will generate it for the Oracle dialect. To change that open the openregistry-repository-jpa-impl/src/test/resources/hibernate.cfg.xml and change the dialect to the one appropriate for your database. Hopefully we can externalize that in the near future.

Generating Clover Test Coverage Reports

OpenRegistry utilizes Clover2 from Atlassian to generate test coverage reports of its code base. These are stored in OPENREGISTRY/target/site/clover/ To generate the reports, use the command below:

mvn clover2:instrument clover2:aggregate clover2:clover

Cutting a Release

A release for OpenRegistry is done using the Maven Release Plugin. Before beginning, make sure you have a PGP key set up locally. Instructions on how to do this can be found here

  1. Ensure there are no uncommitted files
  2. Execute "mvn release:prepare" and answer the questions about versions.
  3. Execute "mvn release:perform"

Committers interested in doing the releases should contact Eric Dalquist or ScottS to gain access to the repository location. You should already have a Nexus username.

This should put the releases into the appropriate repositories and prepare for the next release.