Get the Code

The Basics

The Apache Brooklyn source code is available at GitHub apache/brooklyn, together with many brooklyn-* sub-module projects. Checkout and build all the submodules with:

git clone
cd brooklyn
git submodule init
git submodule update --remote --merge --recursive
git submodule foreach 'git checkout master'

mvn clean install

This will produce an artifact in brooklyn-dist/dist/brooklyn-dist-0.11.0-SNAPSHOT-dist.tar.gz which you can use in the usual way. Some options which may be useful:

  • Use --depth 1 with git clone to skip the history (much faster but your git log will be incomplete)
  • Use -DskipTests with mvn to skip tests (again much faster but it won’t catch failures)
  • See below if you don’t want to use submodules

Thereafter to update the code in submodules, we strongly recommend doing this:

git pull && git submodule update --remote --merge --recursive

This merges the latest upstream changes into the current branch of each sub-module on your local machine, giving nice errors on conflicts. It’s fine also to do branching and pulling in each submodule, but running update without these parameters can cause chaos! This page elaborates on potential chaos and pitfalls, and it provides instructions for setting up an alias git sup for this command.

If You Can’t Stand Submodules

These instructions can help setting up a local environment which does not rely on submodules.

Contributing a Small Change

If you’re making a small change in one project, consider just using that project. Whether you use this uber-project or not, to contribute you’ll need to follow the usual fork->work->push->pull-request process.

To understand where you might want to make your change, look at the code structure.

Bigger and Regular Changes

Regular contributors will typically have their own fork for each of the submodule projects, and will probably want some other settings and tips as described here.

Next Steps

Where things aren’t documented please ask us at the brooklyn mailing list so we can remedy this!