Merge branch 'stable-2.16'

* stable-2.16:
  Upgrade bazlets to latest stable-2.16 to build with 2.16.6 API
  LfsApiServlet: Restore good permission backend check for project access
  Add the standard LICENSE file
  Upgrade bazlets to latest stable-2.15 to build with 2.15.11 API
  LfsApiServlet: use LfsRequest.is(Upload|Download) methods

Change-Id: If93b9af052c23c9b8d4e5512532521100a0f3320
diff --git a/WORKSPACE b/WORKSPACE
index f502198..dec62bb 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -3,27 +3,27 @@
 load("//:bazlets.bzl", "load_bazlets")
 
 load_bazlets(
-    commit = "f7986f2d3e76ae0ca12a8c43ee91205725bd95e2",
+    commit = "738ddb525810a50c792736d7115a1bb5289bd3d3",
     #local_path = "/home/<user>/projects/bazlets",
 )
 
 # Release Plugin API
-load(
-    "@com_googlesource_gerrit_bazlets//:gerrit_api.bzl",
-    "gerrit_api",
-)
-
-# Snapshot Plugin API
 #load(
-#    "@com_googlesource_gerrit_bazlets//:gerrit_api_maven_local.bzl",
-#    "gerrit_api_maven_local",
+#    "@com_googlesource_gerrit_bazlets//:gerrit_api.bzl",
+#    "gerrit_api",
 #)
 
+# Snapshot Plugin API
+load(
+    "@com_googlesource_gerrit_bazlets//:gerrit_api_maven_local.bzl",
+    "gerrit_api_maven_local",
+)
+
 # Load release Plugin API
-gerrit_api()
+#gerrit_api()
 
 # Load snapshot Plugin API
-#gerrit_api_maven_local()
+gerrit_api_maven_local()
 
 load(":external_plugin_deps.bzl", "external_plugin_deps")
 
diff --git a/external_plugin_deps.bzl b/external_plugin_deps.bzl
index f9c5ae7..61b3c8c 100644
--- a/external_plugin_deps.bzl
+++ b/external_plugin_deps.bzl
@@ -1,13 +1,13 @@
 load("//tools/bzl:maven_jar.bzl", "GERRIT", "MAVEN_CENTRAL", "MAVEN_LOCAL", "maven_jar")
 
-JGIT_VERSION = "5.1.3.201810200350-r"
+JGIT_VERSION = "5.2.1.201812262042-r"
 REPO = MAVEN_CENTRAL
 
 def external_plugin_deps():
     maven_jar(
         name = "jgit-http-apache",
         artifact = "org.eclipse.jgit:org.eclipse.jgit.http.apache:" + JGIT_VERSION,
-        sha1 = "d98ca013eb8159b369af99e28be8b96a651c4f79",
+        sha1 = "9ddf5e5fc9b1cb367f1b8321a301b4923ff7ab84",
         repository = REPO,
         unsign = True,
         exclude = [
@@ -19,7 +19,7 @@
     maven_jar(
         name = "jgit-lfs",
         artifact = "org.eclipse.jgit:org.eclipse.jgit.lfs:" + JGIT_VERSION,
-        sha1 = "9fa727360ff65f0443684a78dfc3a099da70a4f2",
+        sha1 = "8bced87e3c9829feb02595743dacbbdde0f68995",
         repository = REPO,
         unsign = True,
         exclude = [
@@ -31,7 +31,7 @@
     maven_jar(
         name = "jgit-lfs-server",
         artifact = "org.eclipse.jgit:org.eclipse.jgit.lfs.server:" + JGIT_VERSION,
-        sha1 = "8655240c3cf005ff22b7da95c2f1f1b23dc746c5",
+        sha1 = "b350bd34e70d4d7812c5f0caf6ff04672c9267c2",
         repository = REPO,
         unsign = True,
         exclude = [
diff --git a/src/main/java/com/googlesource/gerrit/plugins/lfs/LfsApiServlet.java b/src/main/java/com/googlesource/gerrit/plugins/lfs/LfsApiServlet.java
index 34aeb10..08b1662 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/lfs/LfsApiServlet.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/lfs/LfsApiServlet.java
@@ -21,7 +21,7 @@
 import static com.google.gerrit.server.permissions.ProjectPermission.ACCESS;
 import static com.google.gerrit.server.permissions.ProjectPermission.PUSH_AT_LEAST_ONE_REF;
 
-import com.google.gerrit.common.ProjectUtil;
+import com.google.gerrit.server.ProjectUtil;
 import com.google.gerrit.reviewdb.client.Project;
 import com.google.gerrit.server.CurrentUser;
 import com.google.gerrit.server.permissions.PermissionBackend;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/lfs/locks/LfsLocksAction.java b/src/main/java/com/googlesource/gerrit/plugins/lfs/locks/LfsLocksAction.java
index 41bd582..1802254 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/lfs/locks/LfsLocksAction.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/lfs/locks/LfsLocksAction.java
@@ -21,7 +21,7 @@
 import static org.apache.http.HttpStatus.SC_UNAUTHORIZED;
 import static org.eclipse.jgit.util.HttpSupport.HDR_AUTHORIZATION;
 
-import com.google.gerrit.common.ProjectUtil;
+import com.google.gerrit.server.ProjectUtil;
 import com.google.gerrit.extensions.restapi.AuthException;
 import com.google.gerrit.reviewdb.client.Project;
 import com.google.gerrit.server.CurrentUser;