Buck: Fix api build

gwt-dev dependencies were moved from external constant to maven_jar()
exported_deps dependency in I54df92daf. As the consequence, maven_jar
makes from it java_library instead of prebuil_jar. As the consequence
java_library without sources and resources doesn't expose output jar.

This broke java_doc() rule in gwtui-api that makes use of $(location)
macro. This macros is failing on libraries without own output jar.

To rectify it, expose intermediate prebuilt_jar from maven_jar() rule
with the same visibility scope as the final artifact. Now it can be
used in java_doc() as it exposes output jar and exported_deps aren't
needed in this context.

Change-Id: I6168fda0aba8827063958f80c6e2828b0a6941f8
(cherry picked from commit 1da31b3520)
This commit is contained in:
David Ostrovsky 2015-06-25 21:54:07 +02:00 committed by David Pursehouse
parent 07703c1520
commit 32bed1d285
2 changed files with 7 additions and 6 deletions

View File

@ -3,10 +3,7 @@ GWTEXPUI = ['gerrit-gwtexpui/src/main/java/']
SRC = 'src/main/java/com/google/gerrit/'
SRCS = glob([SRC + '**/*.java'])
DEPS = [
'//lib/gwt:user',
'//lib/gwt:dev',
]
DEPS = ['//lib/gwt:user']
java_binary(
name = 'gwtui-api',
@ -36,7 +33,7 @@ java_library(
'//gerrit-gwtexpui:UserAgent',
'//gerrit-gwtui-common:client-lib2',
],
provided_deps = DEPS,
provided_deps = DEPS + ['//lib/gwt:dev'],
visibility = ['PUBLIC'],
)
@ -69,7 +66,10 @@ java_doc(
],
paths = COMMON + GWTEXPUI,
srcs = SRCS,
deps = DEPS + ['//gerrit-gwtui-common:client-lib2'],
deps = DEPS + [
'//lib/gwt:dev__jar',
'//gerrit-gwtui-common:client-lib2',
],
visibility = ['PUBLIC'],
do_it_wrong = True,
)

View File

@ -125,6 +125,7 @@ def maven_jar(
deps = deps,
binary_jar = ':%s__download_bin' % name,
source_jar = ':%s__download_src' % name if srcjar else None,
visibility = visibility,
)
java_library(
name = name,