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 http://github.com/apache/brooklyn/
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-1.1.0-SNAPSHOT-dist.tar.gz
which you can use in the usual way.
Some options which may be useful:
- Use
--depth 1
withgit clone
to skip the history (much faster but yourgit log
will be incomplete) - Use
-DskipTests
withmvn
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
-
See the detailed Brooklyn & Git guide to set up forks or handy git aliases
-
Visit the Developer Guide has information on project structure, Maven setup and more
-
Review How to Contribute to file your CLA or project structure, Maven setup and more
Where things aren’t documented please ask us at the brooklyn mailing list so we can remedy this!