9a4efd3fff
Both of these jars provide a provider-configuration file in META-INF/services/org.apache.lucene.codecs.Codec registering their respective implementations as providers of this codec. The proper way to merge these files is to concatenate them, but the normal Buck build process would otherwise choose one arbitrarily. Add a new custom rule merge_maven_jars to merge multiple Maven jars together using a simple Python script. The script concatenates all the entries in two zip files, preferring the entry found in the first file on the command line, which is still arbitrary but at least deterministic. It specially handles files in the META-INF/services directory by concatenating them. Use this new rule to merge the old :core and :backward-codecs rules into a single :core-and-backward-codecs rule. Change-Id: I42fd1a130e42cb0eebf7bee61cfdf8545397cd09
61 lines
1.2 KiB
Python
61 lines
1.2 KiB
Python
include_defs('//lib/maven.defs')
|
|
|
|
java_binary(
|
|
name = 'asciidoc',
|
|
main_class = 'AsciiDoctor',
|
|
deps = [':asciidoc_lib'],
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
java_library(
|
|
name = 'asciidoc_lib',
|
|
srcs = ['java/AsciiDoctor.java'],
|
|
deps = [
|
|
':asciidoctor',
|
|
':jruby',
|
|
'//lib:args4j',
|
|
'//lib:guava',
|
|
'//lib/log:api',
|
|
],
|
|
visibility = ['//tools/eclipse:classpath'],
|
|
)
|
|
|
|
java_binary(
|
|
name = 'doc_indexer',
|
|
main_class = 'DocIndexer',
|
|
deps = [':doc_indexer_lib'],
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
java_library(
|
|
name = 'doc_indexer_lib',
|
|
srcs = ['java/DocIndexer.java'],
|
|
deps = [
|
|
':asciidoc_lib',
|
|
'//gerrit-server:constants',
|
|
'//lib:args4j',
|
|
'//lib:guava',
|
|
'//lib/lucene:analyzers-common',
|
|
'//lib/lucene:core-and-backward-codecs',
|
|
],
|
|
visibility = ['//tools/eclipse:classpath'],
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'asciidoctor',
|
|
id = 'org.asciidoctor:asciidoctorj:1.5.2',
|
|
sha1 = '39d33f739ec1c46f6e908a725264eb74b23c9f99',
|
|
license = 'Apache2.0',
|
|
visibility = [],
|
|
attach_source = False,
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'jruby',
|
|
id = 'org.jruby:jruby-complete:1.7.18',
|
|
sha1 = 'a1be3e1790aace5c99614a87785454d875eb21c2',
|
|
license = 'DO_NOT_DISTRIBUTE',
|
|
visibility = [],
|
|
attach_source = False,
|
|
)
|