diff --git a/BUCK b/BUCK index 6aed3d72dd..5a38439429 100644 --- a/BUCK +++ b/BUCK @@ -5,7 +5,7 @@ gerrit_war(name = 'chrome', ui = 'ui_chrome') gerrit_war(name = 'firefox', ui = 'ui_firefox') gerrit_war(name = 'safari', ui = 'ui_safari') gerrit_war(name = 'withdocs', docs = True) -gerrit_war(name = 'release', docs = True, context = ['//plugins:core.zip']) +gerrit_war(name = 'release', docs = True, context = ['//plugins:core.zip'], visibility = ['//tools/maven:']) API_DEPS = [ '//gerrit-extension-api:extension-api', diff --git a/Documentation/dev-buck.txt b/Documentation/dev-buck.txt index 45bd6ec936..10d0640c22 100644 --- a/Documentation/dev-buck.txt +++ b/Documentation/dev-buck.txt @@ -136,13 +136,13 @@ project directories in `buck-out/gen`, here as example for plugin API: buck-out/gen/gerrit-plugin-api/plugin-api-javadoc.jar ---- -Install {extension,plugin,gwt}-api to the local maven repository: +Install {extension,plugin,gwt}-api and gerrit.war to the local maven repository: ---- buck build api_install ---- -Deploy {extension,plugin,gwt}-api to the remote maven repository: +Deploy {extension,plugin,gwt}-api and gerrit.war to the remote maven repository: ---- buck build api_deploy diff --git a/tools/build.defs b/tools/build.defs index 4bb48ea035..af39c2a07c 100644 --- a/tools/build.defs +++ b/tools/build.defs @@ -78,7 +78,7 @@ def war( visibility = visibility, ) -def gerrit_war(name, ui = 'ui_optdbg', context = [], docs = False): +def gerrit_war(name, ui = 'ui_optdbg', context = [], docs = False, visibility = []): war( name = name, libs = LIBS + ['//gerrit-war:version'], @@ -89,4 +89,5 @@ def gerrit_war(name, ui = 'ui_optdbg', context = [], docs = False): '//gerrit-gwtui:' + ui + '.zip', ] + context, docs = docs, + visibility = visibility, ) diff --git a/tools/maven/BUCK b/tools/maven/BUCK index f625b7b3d1..b6b501e20b 100644 --- a/tools/maven/BUCK +++ b/tools/maven/BUCK @@ -22,6 +22,7 @@ maven_package( 'gerrit-plugin-api': '//gerrit-plugin-api:plugin-api-javadoc', 'gerrit-plugin-gwtui': '//gerrit-plugin-gwtui:gwtui-api-javadoc', }, + war = {'gerrit-war': '//:release'}, ) python_binary( diff --git a/tools/maven/package.defs b/tools/maven/package.defs index 3171a316fd..9e5a14465e 100644 --- a/tools/maven/package.defs +++ b/tools/maven/package.defs @@ -18,11 +18,12 @@ def maven_package( url = None, jar = {}, src = {}, - doc = {}): + doc = {}, + war = {}): cmd = ['$(exe //tools/maven:mvn)', '-v', version, '-o', '$OUT'] dep = [] - for type,d in [('jar', jar), ('java-source', src), ('javadoc', doc)]: + for type,d in [('jar', jar), ('java-source', src), ('javadoc', doc), ('war', war)]: for a,t in d.iteritems(): cmd.append('-s %s:%s:$(location %s)' % (a,type,t)) dep.append(t)