Bazel: Support publishing to snapshot Maven repository

Change-Id: Ie60d322290e24c00394926bf43b1c8019f8d37c8
This commit is contained in:
David Ostrovsky
2017-02-09 06:22:35 +01:00
parent 62bdb55c70
commit f3831dac4d

View File

@@ -3,8 +3,7 @@ load("//tools/maven:package.bzl", "maven_package")
MAVEN_REPOSITORY = "sonatype-nexus-staging"
# TODO(davido): support snapshot repositories
MAVEN_RELEASE_URL = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
URL = "https://oss.sonatype.org/content/repositories/snapshots" if GERRIT_VERSION.endswith("-SNAPSHOT") else "https://oss.sonatype.org/service/local/staging/deploy/maven2"
maven_package(
src = {
@@ -26,7 +25,7 @@ maven_package(
"gerrit-plugin-gwtui": "//gerrit-plugin-gwtui:gwtui-api_deploy.jar",
},
repository = MAVEN_REPOSITORY,
url = MAVEN_RELEASE_URL,
url = URL,
version = GERRIT_VERSION,
war = {"gerrit-war": "//:release"},
)