gerrit/gerrit-war/BUCK
David Ostrovsky 919250fd63 gerrit-pgm: Align Buck rules with package boundaries
Extract http package in its own rule and include it it gerrit-war. That
means that the new artifact is going to be packaged in WEB-INF/lib
directory leaving only root pgm package artifact in pgm-lib.

Remove shell package and move one class in root pgm package. A resource
file that belongs to this functionality as well, was already in root
resource package, so it wasn't consistent anyway.

This change also extracts DEPS dependency definition with artifacts that
are shared in different rules to reuse them and not to repeat the code.

Change-Id: Ie8cbab9c1333ef34dd240619e214674f8b583d2c
2014-11-06 21:44:35 +00:00

77 lines
1.6 KiB
Python

include_defs('//tools/git.defs')
java_library(
name = 'init',
srcs = glob(['src/main/java/**/*.java']),
deps = [
'//gerrit-cache-h2:cache-h2',
'//gerrit-extension-api:api',
'//gerrit-httpd:httpd',
'//gerrit-lucene:lucene',
'//gerrit-openid:openid',
'//gerrit-pgm:http',
'//gerrit-pgm:init',
'//gerrit-pgm:init-api',
'//gerrit-pgm:util',
'//gerrit-reviewdb:server',
'//gerrit-server:server',
'//gerrit-server/src/main/prolog:common',
'//gerrit-solr:solr',
'//gerrit-sshd:sshd',
'//lib:guava',
'//lib:gwtorm',
'//lib/guice:guice',
'//lib/guice:guice-servlet',
'//lib/log:api',
'//lib/jgit:jgit',
],
provided_deps = ['//lib:servlet-api-3_1'],
visibility = [
'//:',
'//gerrit-gwtdebug:gwtdebug',
'//tools/eclipse:classpath',
],
)
genrule(
name = 'webapp_assets',
cmd = 'cd src/main/webapp; zip -qr $OUT .',
srcs = glob(['src/main/webapp/**/*']),
deps = [],
out = 'webapp_assets.zip',
visibility = ['//:'],
)
genrule(
name = 'log4j-config__jar',
cmd = 'jar cf $OUT -C src/main/resources .',
srcs = ['src/main/resources/log4j.properties'],
out = 'log4j-config.jar',
)
prebuilt_jar(
name = 'log4j-config',
binary_jar = ':log4j-config__jar',
visibility = [
'//:',
'//tools/eclipse:classpath',
],
)
prebuilt_jar(
name = 'version',
binary_jar = ':gen_version',
visibility = ['//:'],
)
genrule(
name = 'gen_version',
cmd = ';'.join([
'cd $TMP',
'mkdir -p com/google/gerrit/common',
'echo "%s" >com/google/gerrit/common/Version' % git_describe(),
'zip -9Dqr $OUT .',
]),
out = 'version.jar',
)