Retrofit to Gerrit 2.5 API.

Allows GitBlit plugin to run on top of the Gerrit 2.5
plugin API.

InitStep feature is not available, GitBlit needs
then to be configured manually in Gerrit GitWeb
configuration.

Change-Id: Ib1ee3cb35ea47879d332193e302639d03482517e
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
diff --git a/pom.xml b/pom.xml
index c4d7714..5926b67 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,10 +20,10 @@
   <artifactId>gitblit-plugin</artifactId>
   <description>GitBlit for Gerrit integrated as a plugin</description>
   <name>Gerrit - GitBlit Plugin</name>
-  <version>1.0-SNAPSHOT</version>
+  <version>2.5-SNAPSHOT</version>
   <properties>
     <Gerrit-ApiType>plugin</Gerrit-ApiType>
-    <Gerrit-ApiVersion>2.6-SNAPSHOT</Gerrit-ApiVersion>
+    <Gerrit-ApiVersion>${project.version}</Gerrit-ApiVersion>
     <Gerrit-ReloadMode>reload</Gerrit-ReloadMode>
     <Gerrit-InitStep>com.googlesource.gerrit.plugins.gitblit.GitBlitInitStep</Gerrit-InitStep>
     <Gerrit-HttpModule>com.googlesource.gerrit.plugins.gitblit.GitBlitModule</Gerrit-HttpModule>
diff --git a/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java b/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java
deleted file mode 100644
index 0ab8ceb..0000000
--- a/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (C) 2012 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-package com.googlesource.gerrit.plugins.gitblit;
-
-import com.google.gerrit.extensions.annotations.PluginName;
-import com.google.gerrit.pgm.init.InitStep;
-import com.google.gerrit.pgm.init.Section;
-import com.google.gerrit.pgm.init.Section.Factory;
-import com.google.gerrit.pgm.util.ConsoleUI;
-import com.google.inject.Inject;
-
-public class GitBlitInitStep implements InitStep {
-  private final ConsoleUI ui;
-  private final String pluginName;
-  private final Factory sections;
-
-  @Inject
-  public GitBlitInitStep(final ConsoleUI ui, final Section.Factory sections,
-      @PluginName final String pluginName) {
-    this.ui = ui;
-    this.pluginName = pluginName;
-    this.sections = sections;
-  }
-
-  @Override
-  public void run() throws Exception {
-    ui.message("\n");
-    ui.header("GitBlit Integration");
-
-    if(ui.yesno(true, "Do you want to use GitBlit as your GitWeb viewer ?")) {
-      configureGitBlit();
-    }
-  }
-
-  private void configureGitBlit() {
-    Section gitWeb = sections.get("gitweb", null);
-    gitWeb.set("type", "custom");
-    gitWeb.set("url", "plugins/");
-    gitWeb.set("project", pluginName + "/summary/${project}");
-    gitWeb.set("revision", pluginName + "/commit/${project}/${commit}");
-    gitWeb.set("branch", pluginName + "/log/${project}/${branch}");
-    gitWeb.set("filehistory", pluginName + "/history/${project}/${branch}/${file}");
-    gitWeb.string("Link name", "linkname", "GitBlit");
-  }
-
-}