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>
This commit is contained in:
Dariusz Luksza 2014-04-30 13:01:19 +02:00
parent 5cca35c365
commit 3ffc86a6a0
5 changed files with 9 additions and 6 deletions

2
BUCK
View File

@ -4,7 +4,7 @@ gerrit_war(name = 'gerrit')
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',

View File

@ -142,13 +142,13 @@ The output JAR files will be placed in:
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

View File

@ -67,7 +67,7 @@ def war(
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 @@ def gerrit_war(name, ui = 'ui_optdbg', context = []):
'//gerrit-war:webapp_assets.zip',
'//gerrit-gwtui:' + ui + '.zip',
] + context,
visibility = visibility,
)

View File

@ -17,6 +17,7 @@ maven_package(
'gerrit-plugin-api': '//:plugin-api-src',
'gerrit-plugin-gwtui': '//:plugin-gwtui-src',
},
war = {'gerrit-war': '//:release'},
)
python_binary(

View File

@ -17,11 +17,12 @@ def maven_package(
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)