small tidy of maven build instructions however there's been talk (and general agreement) of switching to the default being to skip deb, rpm, and go-client, unless you opt *in*
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/d97154e2 Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/d97154e2 Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/d97154e2 Branch: refs/heads/0.9.0 Commit: d97154e2a17a3f9916d3586a0c22416cd9dbf262 Parents: b34d71e Author: Alex Heneveld <[email protected]> Authored: Wed May 4 18:29:06 2016 +0100 Committer: Alex Heneveld <[email protected]> Committed: Fri May 13 12:57:39 2016 +0100 ---------------------------------------------------------------------- guide/dev/env/maven-build.md | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/d97154e2/guide/dev/env/maven-build.md ---------------------------------------------------------------------- diff --git a/guide/dev/env/maven-build.md b/guide/dev/env/maven-build.md index 460ab51..7de7089 100644 --- a/guide/dev/env/maven-build.md +++ b/guide/dev/env/maven-build.md @@ -6,35 +6,42 @@ toc: /guide/toc.json ## The Basics -To build the code, you need Maven (v3.1+) and Java (v1.7+, 1.8 recommended) and Go (v1.6+). -With that in place, you should be able to build everything with a: +The full build requires the following software to be installed: + +* Maven (v3.1+) +* Java (v1.7+, 1.8 recommended) +* Go (v1.6+) [if building the CLI client] +* rpm tools [if building the dist packages for those platforms] + +With these in place, you should be able to build everything with a: {% highlight bash %} % mvn clean install {% endhighlight %} -Key things to note if you're new to Maven: - -* You may need more JVM memory, e.g. at the command-line (or in `.profile`): +Alternatively you can build most things with just Java and Maven installed using: - ``export MAVEN_OPTS="-Xmx1024m -Xms512m -XX:MaxPermSize=256m"`` +{% highlight bash %} +mvn clean install -Dno-go-client -Dno-rpm` +{% endhighlight %} -* You can do this in specific projects as well. +Other tips: -* Add ``-DskipTests`` to skip tests. +* Add ``-DskipTests`` to skip tests (builds much faster, but not as safe) -* Add ``-Dno-go-client`` to skip building the ``brooklyn-client`` project (useful if you don't have Go installed). +* You may need more JVM memory, e.g. at the command-line (or in `.profile`): -* You may need to install ``rpm`` package to build RPM packages: ``brew install rpm`` for Mac OS, ``apt-get install rpm`` for Ubuntu, ``yum install rpm`` for Centos/RHEL. + ``export MAVEN_OPTS="-Xmx1024m -Xms512m -XX:MaxPermSize=256m"`` * Run ``-PIntegration`` to run integration tests, or ``-PLive`` to run live tests ([tests described here](../code/tests.html)) -* Note that many of the gory details are in ``brooklyn-server/parent/pom.xml``, which is referenced by most other poms. +* You may need to install ``rpm`` package to build RPM packages: ``brew install rpm`` for Mac OS, ``apt-get install rpm`` for Ubuntu, ``yum install rpm`` for Centos/RHEL. + On Mac OS you may also need to set `%_tmppath /tmp` in `~/.rpmmacros`. + +* If you're looking at the maven internals, note that many of the settings are inherited from parent projects (see for instance `brooklyn-server/parent/pom.xml`) -* You can also open and use the code in your favourite IDE, - although you may hit a few **[snags](ide/)** - (that link has some tips for resolving them too) +* For tips on building within various IDEs, look [here](ide/). ## When the RAT Bites
