Merge branch 'stable-2.8'

* stable-2.8:
  Bump pom.xml to Gerrit-2.8.1, added plugin repository
  Bump GitBlit to Ver. 1.3.2
  Fixing URL rewrite for projects in MyDashboard page.

Conflicts:
	pom.xml

Change-Id: I1878094f80026749fb4fc3fc10042477f6a77a96
diff --git a/BUCK b/BUCK
new file mode 100644
index 0000000..a66e8d2
--- /dev/null
+++ b/BUCK
@@ -0,0 +1,46 @@
+gerrit_plugin(
+  name = 'gitblit',
+  srcs = glob(['src/main/java/**/*.java']),
+  manifest_entries = [
+    'Gerrit-PluginName: gitblit',
+    'Gerrit-Module: com.googlesource.gerrit.plugins.gitblit.GitBlitModule',
+    'Gerrit-HttpModule: com.googlesource.gerrit.plugins.gitblit.GitBlitServletModule',
+    'Gerrit-InitStep: com.googlesource.gerrit.plugins.gitblit.GitBlitInitStep',
+    'Gerrit-ReloadMode: restart',
+  ],
+  deps = [
+    '//lib/commons:httpcore',
+    '//lib/commons:net',
+    '//lib/commons:codec',
+    '//plugins/gitblit/lib:gitblit-jar',
+    '//plugins/gitblit/lib:wicket',
+    '//plugins/gitblit/lib:wicket-extensions',
+    '//plugins/gitblit/lib:wicketstuff',
+    '//plugins/gitblit/lib:javax-mail',
+    '//plugins/gitblit/lib:groovy',
+    '//plugins/gitblit/lib:beust-jcommander',
+    '//plugins/gitblit/lib:jdom',
+    '//plugins/gitblit/lib:lucene-core',
+    '//plugins/gitblit/lib:lucene-highlighter',
+    '//plugins/gitblit/lib:lucene-memory',
+    '//plugins/gitblit/lib:markdownpapers',
+    '//plugins/gitblit/lib:rome',
+    '//plugins/gitblit/lib:unboundid',
+    ':gitblit-properties-jar',
+  ]
+)
+
+prebuilt_jar(
+  name = 'gitblit-properties-jar',
+  binary_jar = genfile('gitblit-properties.zip'),
+  deps = [':gitblit-properties'],
+)
+
+genrule(
+  name = 'gitblit-properties',
+  cmd = 'cp $SRCDIR/src/main/resources/gitblit.properties $TMP'
+    + ';cd $TMP'
+    + ';zip -q $OUT *',
+  srcs = ['src/main/resources/gitblit.properties'],
+  out = 'gitblit-properties.zip',
+)
diff --git a/ReleaseNotes-2.9.txt b/ReleaseNotes-2.9.txt
new file mode 100644
index 0000000..80b899d
--- /dev/null
+++ b/ReleaseNotes-2.9.txt
@@ -0,0 +1,24 @@
+Release notes for Gitblit 2.9
+=============================
+
+
+Gitblit 2.9 is now available:
+
+
+Configuration Change
+--------------------
+
+
+*WARNING:* This release contains possibly gerrit.config changes.
+To upgrade:
+----
+  java -jar gerrit.war init -d site_path
+----
+
+Alternatively it can be adjusted manually: the name of the plugin is
+now constant: 'gitblit':
+
+[gitweb]
+        type = custom
+        url = /plugins/gitblit/
+[...]
diff --git a/lib/BUCK b/lib/BUCK
new file mode 100644
index 0000000..f3892f0
--- /dev/null
+++ b/lib/BUCK
@@ -0,0 +1,111 @@
+include_defs('//lib/maven.defs')
+GERRITFORGE = 'http://gerritforge.com/snapshot'
+
+maven_jar(
+  name = 'gitblit-jar',
+  id = 'com.gitblit:gitblit:1.4.0-SNAPSHOT',
+  sha1 = '5d1a6df0ed4ee0517e1f61cdf92b7fb47b4b1119',
+  license = 'Apache2.0',
+  repository = GERRITFORGE,
+)
+
+maven_jar(
+  name = 'wicket',
+  id = 'org.apache.wicket:wicket:1.4.21-selfload',
+  sha1 = 'b822e4ce05232f39cc60adc59d3866452f919d6d',
+  license = 'Apache2.0',
+  repository = GERRITFORGE,
+)
+
+maven_jar(
+  name = 'wicket-auth-roles',
+  id = 'org.apache.wicket:wicket-auth-roles:1.4.21',
+  sha1 = '1b130dbf5578ace37507430a4a523f6594bf34fa',
+  license = 'Apache2.0',
+)
+
+maven_jar(
+  name = 'wicket-extensions',
+  id = 'org.apache.wicket:wicket-extensions:1.4.21',
+  sha1 = 'fac510c7ee4399a29b927405ec3de40b67d105d8',
+  license = 'Apache2.0',
+)
+
+maven_jar(
+  name = 'wicketstuff',
+  id = 'org.wicketstuff:googlecharts:1.4.21',
+  sha1 = '73d7540267afc3a0e91ca6148d3073e050dba180',
+  license = 'Apache2.0',
+)
+
+maven_jar(
+  name = 'javax-mail',
+  id = 'javax.mail:mail:1.4',
+  sha1 = '1aa1579ae5ecd41920c4f355b0a9ef40b68315dd',
+  license = 'Apache2.0',
+)
+
+maven_jar(
+  name = 'groovy',
+  id = 'org.codehaus.groovy:groovy-all:1.8.8',
+  sha1 = '98a489343d3c30da817d36cbea5de11ed07bef31',
+  license = 'Apache2.0',
+)
+
+maven_jar(
+  name = 'beust-jcommander',
+  id = 'com.beust:jcommander:1.17',
+  sha1 = '219a3540f3b27d7cc3b1d91d6ea046cd8723290e',
+  license = 'Apache2.0',
+)
+
+maven_jar(
+  name = 'jdom',
+  id = 'jdom:jdom:1.0',
+  sha1 = 'a2ac1cd690ab4c80defe7f9bce14d35934c35cec',
+  license = 'Apache2.0',
+)
+
+# Unfortunately an older version than used by Gerrit itself
+maven_jar(
+  name = 'lucene-core',
+  id = 'org.apache.lucene:lucene-core:3.6.0',
+  sha1 = '8a0429de6b7c9918841fa2c441a6ef4cc07f2a18',
+  license = 'Apache2.0',
+)
+
+maven_jar(
+  name = 'lucene-highlighter',
+  id = 'org.apache.lucene:lucene-highlighter:3.6.0',
+  sha1 = '9ee691f1dcc60f093df433c165d6a686c6d24553',
+  license = 'Apache2.0',
+)
+
+maven_jar(
+  name = 'lucene-memory',
+  id = 'org.apache.lucene:lucene-memory:3.6.1',
+  sha1 = '8c7ca5572edea50973dc0d26cf75c27047eebe7e',
+  license = 'Apache2.0',
+)
+
+maven_jar(
+  name = 'markdownpapers',
+  id = 'org.tautua.markdownpapers:markdownpapers-core:1.3.2',
+  sha1 = 'da22db6660e90b9a677bbdfc2c511c619ea5c249',
+  license = 'Apache2.0',
+)
+
+maven_jar(
+  name = 'rome',
+  id = 'rome:rome:1.0-selfload',
+  sha1 = 'e8d80293c9c13b557f4e570d3e12afcaf64ac6d4',
+  license = 'Apache2.0',
+  repository = GERRITFORGE
+)
+
+maven_jar(
+  name = 'unboundid',
+  id = 'com.unboundid:unboundid-ldapsdk:2.3.0',
+  sha1 = '6fde8d9fb4ee3e7e3d7e764e3ea57195971e2eb2',
+  license = 'Apache2.0',
+)
diff --git a/pom.xml b/pom.xml
index 7ca36c9..28a6c99 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,7 +20,7 @@
   <artifactId>gitblit-plugin</artifactId>
   <description>GitBlit for Gerrit integrated as a plugin</description>
   <name>Gerrit - GitBlit Plugin</name>
-  <version>2.8.1</version>
+  <version>2.9-SNAPSHOT</version>
   <properties>
     <Gerrit-ApiType>plugin</Gerrit-ApiType>
     <Gerrit-ApiVersion>${project.version}</Gerrit-ApiVersion>
@@ -38,7 +38,7 @@
     <dependency>
       <groupId>com.gitblit</groupId>
       <artifactId>gitblit</artifactId>
-      <version>1.3.2</version>
+      <version>1.4.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.wicket</groupId>
@@ -167,6 +167,7 @@
             <transformer
               implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
               <manifestEntries>
+                <Gerrit-PluginName>gitblit</Gerrit-PluginName>
                 <Gerrit-Module>${Gerrit-Module}</Gerrit-Module>
                 <Gerrit-HttpModule>${Gerrit-HttpModule}</Gerrit-HttpModule>
                 <Gerrit-InitStep>${Gerrit-InitStep}</Gerrit-InitStep>
diff --git a/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java b/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java
index d76594b..345a70a 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java
@@ -54,4 +54,7 @@
     gitWeb.string("Link name", "linkname", "GitBlit");
   }
 
+  @Override
+  public void postRun() throws Exception {
+  }
 }