Use a local build of GitBlit 1.7.1 for static res

Gerrit plugins need to access static resources under the /static
folder of the jar, which unfortunately is different from what is
typically done when distributing GitBlit jar on Maven.

We need to build GitBlit 1.7.1 from sources with the /static resources
to get the GitBlit plugin working in Gerrit and serving all CSS and images.

Change-Id: I28101db85bfa40f57fc3c2dc75aff88cdd996ed9
2 files changed
tree: 9341a4ac572f51205009d5bcfbdab892d6120700
  1. lib/
  2. src/
  3. .gitignore
  4. BUCK
  6. pom.xml
  8. ReleaseNotes-2.9.txt

GitBlit plugin


Purpose of this plugin is to use Gitblit as web-based viewer (i.e. GitWeb replacement) on top of Gerrit Code Review.

How to build

As pre-requisites you need to make a custom-build of Gitblit and Wicket: the standard JARs downloaded from a public Maven repository aren't enough as they are missing some specific build parameters and constraints (i.e. shaded-jar) that are needed for a Gerrit plugin to work properly.


You need to clone Gitblit from GitHub and build it locally using the installMaven ANT target.

$ git clone
$ git checkout develop
$ ant -DresourceFolderPrefix=static installMaven

Gitblit plugin

You are ready now to clone and build the Gitblit plugin: the Wicket and Giblit dependencies will be taken from your local Maven repository.

$ mvn package


In order to use GitBlit as GitWeb replacement, please apply the following configuration to your Gerrit config.

    type = custom
    linkname = Gitblit
    url = plugins/gitblit/
    revision = commit/?r=${project}&h=${commit}
    project = summary/?r=${project}
    branch = log/?r=${project}&h=${branch}
    filehistory = history/?f=${file}&r=${project}&h=${branch}
    file = blob/?r=${project}&h=${commit}&f=${file}
    roottree = tree/?r=${project}&h=${commit}