If you need information about the HornetQ project please go to
This file describes some minimum 'stuff one needs to know' to get started coding in this project.
The project's source code is hosted at:
Pull requests should be merged without fast forwards '--no-ff'. An easy way to achieve that is to use
% git config branch.master.mergeoptions --no-ff
The minimum required Maven version is 3.0.0.
To run the unit tests:
% mvn -Phudson-tests test
Generating reports from unit tests:
% mvn install site
Running tests individually
% mvn -Phudson-tests -DfailIfNoTests=false -Dtest=<test-name> test
where <test-name> is the name of the Test class without its package name
To run an example firstly make sure you have run
% mvn -Prelease install
If the project version has already been released then this is unnecessary.
then you will need to set the following maven options, on Linux by
export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=512m"
and the finally run the examples by
% mvn verify
You can also run individual examples by running the same command from the directory of which ever example you want to run. NB for this make sure you have installed examples/common.
Recreating the examples
If you are trying to copy the examples somewhere else and modifying them. Consider asking Maven to explicitly list all the dependencies:
# if trying to modify the 'topic' example: cd examples/jms/topic && mvn dependency:list
To build a release artifact
% mvn -Prelease install
To build the release bundle
% mvn -Prelease package
We recommend using Eclipse Kepler (4.3), due to the built-in support for Maven and Git. Note that there are still some Maven plugins used by sub-projects (e.g. documentation) which are not supported even in Eclipse Kepler (4.3).
HornetQ uses JBoss Logging and that requires source code generation from Java annotations. In order for it to 'just work' in Eclipse you need to install the Maven Integration for Eclipse JDT Annotation Processor Toolkit m2e-apt. See this JBoss blog post for details.
M2E Connector for Javacc-Maven-Plugin
Eclipse Indigo (3.7) has out-of-the-box support for it.
As of this writing, Eclipse Kepler (4.3) still lacks support for Maven's javacc plugin. The available m2e connector for javacc-maven-plugin requires a downgrade of Maven components to be installed. manual installation instructions (as of this writing you need to use the development update site). See this post for how to do this with Eclipse Juno (4.2).
The current recommended solution for Eclipse Kepler is to mark
javacc-maven-plugin as ignored by Eclipse, run Maven from the
command line and then modify the project
target/generated-sources/javacc to its build path.
Use Project Working Sets
Importing all HornetQ subprojects will create too many projects in Eclipse, cluttering your Package Explorer and Project Explorer views. One way to address that is to use Eclipse's Working Sets feature. A good introduction to it can be found at a Dzone article on Eclipse Working Sets.
Eclipse code formatting and (basic) project configuration files can be found at
etc/ folder. You should manually copy them after importing all your
for settings_dir in `find . -type d -name .settings`; do \cp -v etc/org.eclipse.jdt.* $settings_dir done
We follow the GitHub workflow for all code changes in HornetQ. For information on the GitHub workflow please see: https://guides.github.com/introduction/flow/index.html
We follow the 50/72 git commit message format. A HornetQ commit message should be formatted in the following manner:
- Add the HornetQ JIRA or Bugzilla reference (if one exists) followed by a brief description of the change in the first line.
- Insert a single blank line after the first line.
- Provide a detailed description of the change in the following lines, breaking paragraphs where needed.
- The first line should be limited to 50 characters
- Subsequent lines should be wrapped at 72 characters.
An example correctly formatted commit message:
HORNETQ-1234 Add new commit msg format to README Adds a description of the new commit message format as well as examples of well formatted commit messages to the README.md. This is required to enable developers to quickly identify what the commit is intended to do and why the commit was added.