
When deploying Gerrit in an osgi container we see an issue where the javax.annotation.Nullable annotation is not available at runtime. As a consequence Guice injection throws an error if a (Nullable) parameter is null. A research on that topic reveals that this is caused by the Split Package issue in osgi [1]. The javax.annotation.* package is split as one part of it comes from JRE and another one from the jsr305 packaged in gerrit.war. Since guice supports usage of any Nullable annotation type whose simple name is "Nullable" [2], we can use own Nullable annotation type. [1] http://wiki.osgi.org/wiki/Split_Packages [2] https://code.google.com/p/google-guice/source/browse/core/src/com/google/inject/internal/Nullability.java Change-Id: I63b27be6d695e73fd92940e42169d09f751d7274
41 lines
921 B
Python
41 lines
921 B
Python
QUERY_BUILDER = [
|
|
'src/main/java/com/google/gerrit/lucene/QueryBuilder.java',
|
|
]
|
|
|
|
java_library(
|
|
name = 'query_builder',
|
|
srcs = QUERY_BUILDER,
|
|
deps = [
|
|
'//gerrit-antlr:query_exception',
|
|
'//gerrit-reviewdb:server',
|
|
'//gerrit-server:server',
|
|
'//lib:gwtorm',
|
|
'//lib:guava',
|
|
'//lib/lucene:core',
|
|
],
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
java_library(
|
|
name = 'lucene',
|
|
srcs = glob(['src/main/java/**/*.java'], excludes = QUERY_BUILDER),
|
|
deps = [
|
|
':query_builder',
|
|
'//gerrit-antlr:query_exception',
|
|
'//gerrit-common:server',
|
|
'//gerrit-extension-api:api',
|
|
'//gerrit-reviewdb:server',
|
|
'//gerrit-server:server',
|
|
'//lib:guava',
|
|
'//lib:gwtorm',
|
|
'//lib:jsr305',
|
|
'//lib/guice:guice',
|
|
'//lib/guice:guice-assistedinject',
|
|
'//lib/jgit:jgit',
|
|
'//lib/log:api',
|
|
'//lib/lucene:analyzers-common',
|
|
'//lib/lucene:core',
|
|
],
|
|
visibility = ['PUBLIC'],
|
|
)
|