Package jsonevent-layout with war

Since java does not allow aditional -classpaths when loading
a -jar (or war in Gerrits case), it is more or less impossible
to add a new external log4j appender when using embedded jetty.

This change packages the common jsonevent-layout appender and
its dependencies with gerrit.war, allowing logging in json-format
(usable for instance when sending logs to logstash).

This change also updates commons-lang from 2.5 to 2.6 which is
preferred by jsonevent-layout.

Change-Id: I1a6e35c9e0da571bf88718ce5e56c5d9e8649203
This commit is contained in:
Gustaf Lundh 2015-04-24 16:46:52 +02:00
parent e19c79cd55
commit d00e9e7b99
3 changed files with 18 additions and 2 deletions

View File

@ -59,6 +59,7 @@ java_library(
'//lib/jgit:jgit-archive',
'//lib/joda:joda-time',
'//lib/log:api',
'//lib/log:jsonevent-layout',
'//lib/log:log4j',
'//lib/lucene:analyzers-common',
'//lib/lucene:core',

View File

@ -41,8 +41,8 @@ maven_jar(
maven_jar(
name = 'lang',
id = 'commons-lang:commons-lang:2.5',
sha1 = 'b0236b252e86419eef20c31a44579d2aee2f0a69',
id = 'commons-lang:commons-lang:2.6',
sha1 = '0ce1edb914c94ebc388f086c6827e8bdeec71ac2',
license = 'Apache2.0',
exclude = ['META-INF/LICENSE.txt', 'META-INF/NOTICE.txt'],
)

View File

@ -31,3 +31,18 @@ maven_jar(
license = 'Apache2.0',
exclude = ['META-INF/LICENSE', 'META-INF/NOTICE'],
)
maven_jar(
name = 'jsonevent-layout',
id = 'net.logstash.log4j:jsonevent-layout:1.7',
sha1 = '507713504f0ddb75ba512f62763519c43cf46fde',
license = 'Apache2.0',
deps = [':json-smart', '//lib/commons:lang']
)
maven_jar(
name = 'json-smart',
id = 'net.minidev:json-smart:1.1.1',
sha1 = '24a2f903d25e004de30ac602c5b47f2d4e420a59',
license = 'Apache2.0',
)