Merge branch 'stable-2.13'

* stable-2.13:
  Replace Atlassian Library with vanilla HTTP calls
  Cleanup wsdl stuff, no longer used with Rest-API

Change-Id: I4935818816d59ef00d2614df66094cd54779b419
diff --git a/BUCK b/BUCK
deleted file mode 100644
index eefa42b..0000000
--- a/BUCK
+++ /dev/null
@@ -1,17 +0,0 @@
-gerrit_plugin(
-  name = 'its-jira',
-  srcs = glob(['src/main/java/**/*.java']),
-  resources = glob(['src/main/resources/**/*']),
-  manifest_entries = [
-    'Gerrit-Module: com.googlesource.gerrit.plugins.its.jira.JiraModule',
-    'Gerrit-InitStep: com.googlesource.gerrit.plugins.its.jira.InitJira',
-    'Gerrit-ReloadMode: reload',
-    'Implementation-Title: Jira ITS Plugin',
-    'Implementation-URL: http://www.gerritforge.com',
-    'Implementation-Vendor: GerritForge LLP',
-  ],
-  deps = [
-    '//plugins/its-base:its-base__plugin',
-    '//lib/commons:codec',
-  ],
-)
diff --git a/BUILD b/BUILD
new file mode 100644
index 0000000..8762bf6
--- /dev/null
+++ b/BUILD
@@ -0,0 +1,19 @@
+load("//tools/bzl:plugin.bzl", "gerrit_plugin")
+
+gerrit_plugin(
+    name = "its-jira",
+    srcs = glob(["src/main/java/**/*.java"]),
+    resources = glob(["src/main/resources/**/*"]),
+    manifest_entries = [
+        "Gerrit-PluginName: its-jira",
+        "Gerrit-Module: com.googlesource.gerrit.plugins.its.jira.JiraModule",
+        "Gerrit-InitStep: com.googlesource.gerrit.plugins.its.jira.InitJira",
+        "Gerrit-ReloadMode: reload",
+        "Implementation-Title: Jira ITS Plugin",
+        "Implementation-URL: http://www.gerritforge.com",
+    ],
+    deps = [
+        "//plugins/its-base",
+    ],
+)
+
diff --git a/src/main/java/com/googlesource/gerrit/plugins/its/jira/restapi/JiraRestApi.java b/src/main/java/com/googlesource/gerrit/plugins/its/jira/restapi/JiraRestApi.java
index e0be291..581f40b 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/its/jira/restapi/JiraRestApi.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/its/jira/restapi/JiraRestApi.java
@@ -16,7 +16,7 @@
 
 import com.google.gson.Gson;
 
-import org.apache.commons.codec.binary.Base64;
+import java.util.Base64;
 import org.apache.commons.lang.ArrayUtils;
 import org.eclipse.jgit.util.HttpSupport;
 
@@ -50,7 +50,7 @@
   JiraRestApi(URL url, String user, String pass, Class<T> classOfT,
       String classPrefix) {
     String auth = user + ":" + pass;
-    this.auth = new String(Base64.encodeBase64(auth.getBytes()));
+    this.auth = new String(Base64.getEncoder().encodeToString(auth.getBytes()));
     this.baseUrl = url;
     this.gson = new Gson();
     this.classOfT = classOfT;
diff --git a/src/main/resources/Documentation/build.md b/src/main/resources/Documentation/build.md
index 6a40483..1235321 100644
--- a/src/main/resources/Documentation/build.md
+++ b/src/main/resources/Documentation/build.md
@@ -1,7 +1,7 @@
 Build
 =====
 
-This @PLUGIN@ plugin is built with Buck.
+This @PLUGIN@ plugin is built with Bazel.
 
 Clone (or link) both this plugin and also
 [plugins/its-base](https://gerrit-review.googlesource.com/#/admin/projects/plugins/its-base)
@@ -10,7 +10,7 @@
 Then issue
 
 ```
-  buck build plugins/@PLUGIN@
+  bazel build plugins/@PLUGIN@
 ```
 
 in the root of Gerrit's source tree to build
@@ -18,21 +18,17 @@
 The output is created in
 
 ```
-  buck-out/gen/plugins/@PLUGIN@/@PLUGIN@.jar
+  bazel-genfiles/plugins/@PLUGIN@/@PLUGIN@.jar
 ```
 
-This project can be imported into the Eclipse IDE:
+This project can be imported into the Eclipse IDE.
+Add the plugin name to the `CUSTOM_PLUGINS` set in
+Gerrit core in `tools/bzl/plugins.bzl`, and execute:
 
 ```
   ./tools/eclipse/project.py
 ```
 
-To execute the tests run:
-
-```
-  buck test --all --include @PLUGIN@
-```
-
 [Back to @PLUGIN@ documentation index][index]
 
 [index]: index.html
\ No newline at end of file
diff --git a/src/main/resources/Documentation/config.md b/src/main/resources/Documentation/config.md
index 5365d8e..3eff578 100644
--- a/src/main/resources/Documentation/config.md
+++ b/src/main/resources/Documentation/config.md
@@ -81,10 +81,6 @@
     html = "<a href=\"http://jira.example.com/browse/$1\">$1</a>"
     association = SUGGESTED
 
-Once a Git commit with a comment link is detected, the Jira issue ID
-is extracted and a new comment is added to the issue, pointing back to
-the original Git commit.
-
 Jira connectivity
 -----------------
 
@@ -138,62 +134,3 @@
            optional
     Issue-id enforced in commit message [MANDATORY/?]: suggested
 
-GitWeb integration
-----------------
-
-When Gerrit gitweb is configured, an additional direct link from Jira to GitWeb
-will be created, pointing exactly to the Git commit ID containing the Jira issue ID.
-
-Issues workflow automation
---------------------------
-
-Jira plugin is able to automate status transition on the issues based on
-code-review actions performed on Gerrit; actions are performed on Jira using
-the username/password provided during Gerrit init.
-Transition automation is driven by `$GERRIT_SITE/etc/issue-state-transition.config`
-file.
-
-Syntax of the status transition configuration file is the following:
-
-    [action "<issue-status-action>"]
-    change=<state-change-type>
-    verified=<verified-value>
-    code-review=<code-review-value>
-
-`<issue-status-action>`
-:	Action to be performed on the Jira issue when all the condition in the stanza are met.
-
-`<state-change-type>`
-:	Gerrit state change type on which the action will be triggered.
-	Possible values are: `created`, `commented`, `merged`, `abandoned`,
-	`restored`
-
-`<verified-value>`
-:	Verified label added on the Gerrit change with a value from -1 to +1
-
-`<code-review-value>`
-:	Code-Review label added on the Gerrit change with a value from -2 to +2
-
-Note: multiple conditions in the action stanza are possible but at least one must be present.
-
-Example:
-
-    [action "Start Progress"]
-    change=created
-
-    [action "Resolve Issue"]
-    verified=+1
-    code-review=+2
-
-    [action "Close Issue"]
-    change=merged
-
-    [action "Stop Progress"]
-    change=abandoned
-
-The above example defines four status transitions on Jira, based on the following conditions:
-
-* Whenever a new Change is created on Gerrit, start progress on the Jira issue
-* Whenever a change is verified and reviewed with +2, set the Jira issue to resolved
-* Whenever a change is merged to the branch, close the Jira issue
-* Whenever a change is abandoned, stop the progress on the Jira issue