Building JBPM5 from source

Building JBPM5 from source

There’s been a lot of questions on the jBPM forums on how to start using jbpm5. There are two options: download the binary and test the project or do it the hard (and fun) way of checking out the trunk from the repository and compile it yourself.

This alternative is great one you want to dig deeper into the project and understand what happens under the hood. This can be very useful also in debugging situation where a bug is particularly hard to find and you want to check what comes in and out of the engine.

Requirements

To download and compile the jBPM5 sources we need a few tools. These are commonplace and perhaps familiar to you :

  • JDK version 1.6 or newer.
  • GIT.
  • Maven version 2.2 or newer.

Downloading the trunk from GIT

Once you have GIT installed we will invoke the following command to clone (this is a new term coined by GIT and you can think of it as a regular checkout on steroids :) ) the latest source code from the project’s repository:

git clone https://github.com/krisv/jbpm.git jbpm5

If you want to check out a particular version, be sure to change the repository path to point to another version. Take a look at the github projects page.

Compiling and installing using Maven

After GIT finishes to fetch the source code, we need Maven to compile the sources using the project’s POM. It’s really easy thanks to Maven’s powerful engine, just type the following command in the target folder:

mvn install

This will compile the sources, run the appropriate tests (if you want to skip them just add -DskipTests before the install goal) and install the binary jars into the Maven’s local repository.

Optional: Creating Eclipse project’s metadata

If you use Eclipse to develop your project you’ll find this useful to have the jBPM5 sources into the IDE’s workspace. To do this just type:

mvn eclipse:eclipse

And Maven will take care of adding the project’s metadata into the existing project folders so you can use the “Import existing project into the workspace” command to have the sources inside your workspace (be sure to have the M2_REPO variable defined and pointed to your local Maven repository). For importing the source into other IDEs check the Maven documentation.

An alternative to this procedure is to have the m2eclipse plugin installed in your Eclipse installation to directly import the project using its POM.

Summary

This posts aims to show you the first steps to play and have fun with the jBPM5 source code. This will allow you to understand the insides of the project and eventually contribute new features back to the community.

Furthermore, if you want to play around with the designer and gwt-console you can invoke the ant install.demo command inside the jbpm-installer folder to use the demo. For more information about this check the project’s documentation.

JBPM5 professional services

Plugtree LLC offers enterprise services for jBPM5 and Drools 5: custom training suited to your company’s needs, a variety of consulting topics from architecture reviews, best practices and performance tuning, and an all encompassing production support with SLAs according to your needs. We’ve helped dozens of clients to adopt the Drools and jBPM technologies across a variety of industries and you can be one of them too. Contact us: info@plugtree.com

Share

Related posts:

  1. 12 Open Source Project Tips to become an Open Mind Developer
  2. 12 Open Source Project Tips to become an Open Mind Developer
  3. Event Driven Business Process Management in jBPM5
  4. Are you ready for Drools 5.2 + jbpm5?
  5. Introduction to JBPM5
Tags: , ,