title: Get the Code layout: website-normal children:
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:
{% highlight bash %} 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 {% endhighlight %}
This will produce an artifact in brooklyn-dist/dist/brooklyn-dist-0.11.0-dist.tar.gz
which you can use [in the usual way]({{ site.path.guide }}/start/running.html). Some options which may be useful:
--depth 1
with git clone
to skip the history (much faster but your git log
will be incomplete)-DskipTests
with mvn
to skip tests (again much faster but it won't catch failures)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.
These instructions can help setting up a local environment which does not rely on submodules.
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]({{ site.path.guide }}/dev/code/structure.html).
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.
See the detailed Brooklyn & Git guide to set up forks or handy git aliases
Visit the [Developer Guide]({{ site.path.guide }}/dev/) has information on [project structure]({{ site.path.guide }}/dev/code/structure.html), [Maven setup]({{ site.path.guide }}/dev/env/maven-build.html) and more
Review How to Contribute to file your CLA or [project structure]({{ site.path.guide }}/dev/code/structure.html), [Maven setup]({{ site.path.guide }}/dev/env/maven-build.html) and more
Where things aren't documented please ask us at the brooklyn mailing list so we can remedy this!