Fix building gitblit with stable-2.12


12:23:50 /home/jenkins/workspace/plugin-gitblit-stable-2.12/plugins/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/auth/ error: cannot find symbol
12:23:50     request.setAttribute("gerrit-username", webSession.get().getCurrentUser()
12:23:50                                                             ^
12:23:50   symbol:   method getCurrentUser()
12:23:50   location: interface
12:23:50 /home/jenkins/workspace/plugin-gitblit-stable-2.12/plugins/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/auth/ error: cannot find symbol
12:23:50     if (!session.getCurrentUser().getUserName().equals(username)) {
12:23:50                 ^
12:23:50   symbol:   method getCurrentUser()
12:23:50   location: variable session of type
12:23:50 /home/jenkins/workspace/plugin-gitblit-stable-2.12/plugins/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/auth/ note: /home/jenkins/workspace/plugin-gitblit-stable-2.12/plugins/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/auth/ uses or overrides a deprecated API.
12:23:50 /home/jenkins/workspace/plugin-gitblit-stable-2.12/plugins/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/auth/ note: Recompile with -Xlint:deprecation for details.
12:23:50 Errors: 2. Warnings: 1.

Change-Id: I7bab26a12f075a3439735f993d735c17c7969b53
2 files changed
tree: 66f7f9704c042e3d85aabaf73518ca36482053d4
  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}