Skip to content
nllptr edited this page Nov 6, 2014 · 1 revision

It's probably a good idea to have the target version of Gerrit built and installed in your local maven repository.

  1. Install maven (sudo apt-get install maven or similarly).
  2. Install buck as described here. Although the instructions say you need Android SDK, we don't need it for our purposes.
  3. Run git clone https://gerrit.googlesource.com/gerrit to download the gerrit source. cd into the directory and git checkout v2.10-rc0 (the target version is 2.10).
  4. cd into the plugins directory.
  5. Clone the following projects into the plugins directory: commit-message-length-validator, download-commands, replication, reviewnotes, singleusergroup.
  6. For each plugin, cd into its directory and check out the version you're building for, currently 2.10-rc0.
  7. (Optional) Build gerrit with buck build gerrit. buck build war_install will install the .war file into the local maven repository.
  8. For developing plugins, we need the api jar files. Run buck build api to build them. buck build api_install will install them into the local maven repository.
  9. Download bucklets (commonly used buck snippets) [here](git clone https://gerrit.googlesource.com/bucklets).
  10. Clone this repository.
  11. Set up bucklets. Inside the gerrit-reviewassistant folder, run ln -s /path/to/bucklets . followed by ln -s bucklets/buckversion .buckversion.
  12. Now, you're ready to build with buck build plugin.

Clone this wiki locally