Include gerrit.war in api_{install,deploy}
This patch adds gerrit.war into api_{install,deploy} buck build step.
This allows third party maven based builds depend on gerrit.war
artifact.
Change-Id: I22c8d3339a1647913967e423e45462c2c5c255de
Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
diff --git a/BUCK b/BUCK
index a278127..6b4071e 100644
--- a/BUCK
+++ b/BUCK
@@ -4,7 +4,7 @@
gerrit_war(name = 'chrome', ui = 'ui_chrome')
gerrit_war(name = 'firefox', ui = 'ui_firefox')
gerrit_war(name = 'withdocs', context = DOCS)
-gerrit_war(name = 'release', context = DOCS + ['//plugins:core.zip'])
+gerrit_war(name = 'release', context = DOCS + ['//plugins:core.zip'], visibility = ['//tools/maven:'])
API_DEPS = [
':extension-api',
diff --git a/Documentation/dev-buck.txt b/Documentation/dev-buck.txt
index 9c993a8..899153c 100644
--- a/Documentation/dev-buck.txt
+++ b/Documentation/dev-buck.txt
@@ -142,13 +142,13 @@
buck-out/gen/{extension,plugin}-api.jar
----
-Install {extension,plugin}-api to the local maven repository:
+Install {extension,plugin}-api and gerrit.war to the local maven repository:
----
buck build api_install
----
-Deploy {extension,plugin}-api to the remote maven repository
+Deploy {extension,plugin}-api and gerrit.war to the remote maven repository
----
buck build api_deploy
diff --git a/tools/build.defs b/tools/build.defs
index b62c850..21191cf 100644
--- a/tools/build.defs
+++ b/tools/build.defs
@@ -67,7 +67,7 @@
visibility = visibility,
)
-def gerrit_war(name, ui = 'ui_optdbg', context = []):
+def gerrit_war(name, ui = 'ui_optdbg', context = [], visibility = []):
war(
name = name,
libs = LIBS + ['//gerrit-war:version'],
@@ -77,4 +77,5 @@
'//gerrit-war:webapp_assets.zip',
'//gerrit-gwtui:' + ui + '.zip',
] + context,
+ visibility = visibility,
)
diff --git a/tools/maven/BUCK b/tools/maven/BUCK
index 2553d03..ca38e45 100644
--- a/tools/maven/BUCK
+++ b/tools/maven/BUCK
@@ -17,6 +17,7 @@
'gerrit-plugin-api': '//:plugin-api-src',
'gerrit-plugin-gwtui': '//:plugin-gwtui-src',
},
+ war = {'gerrit-war': '//:release'},
)
python_binary(
diff --git a/tools/maven/package.defs b/tools/maven/package.defs
index 7306031..7fd227a 100644
--- a/tools/maven/package.defs
+++ b/tools/maven/package.defs
@@ -17,11 +17,12 @@
repository = None,
url = None,
jar = {},
- src = {}):
+ src = {},
+ war = {}):
cmd = ['$(exe //tools/maven:mvn)', '-v', version, '-o', '$OUT']
dep = []
- for type,d in [('jar', jar), ('java-source', src)]:
+ for type,d in [('jar', jar), ('java-source', src), ('war', war)]:
for a,t in d.iteritems():
cmd.append('-s %s:%s:$(location %s)' % (a,type,t))
dep.append(t)