Dissolve gerrit-pgm top-level directory

Change-Id: Ia03015b91da3df4a8672bc30f13b3e3f048a628c
This commit is contained in:
David Ostrovsky 2017-08-24 08:56:45 +02:00 committed by Dave Borowitz
parent 7cd8475275
commit 0924b93145
127 changed files with 226 additions and 201 deletions

View File

@ -47,9 +47,9 @@ license_map(
name = "licenses",
opts = ["--asciidoctor"],
targets = [
"//gerrit-pgm:pgm",
"//gerrit-gwtui:ui_module",
"//polygerrit-ui/app:polygerrit_ui",
"//java/com/google/gerrit/pgm",
],
visibility = ["//visibility:public"],
)

View File

@ -17,7 +17,7 @@ PROVIDED = [
"//java/com/google/gerrit/lucene",
"//java/com/google/gerrit/metrics",
"//java/com/google/gerrit/reviewdb:server",
"//gerrit-pgm:init",
"//java/com/google/gerrit/pgm/init",
"//gerrit-server:receive",
"//gerrit-server:server",
"//lib:gson",
@ -41,14 +41,14 @@ java_library2(
srcs = SRCS,
exported_deps = [
"//gerrit-launcher:launcher",
"//gerrit-pgm:daemon",
"//gerrit-pgm:http-jetty",
"//gerrit-pgm:util-nodep",
"//gerrit-server:testutil",
"//java/com/google/gerrit/gpg",
"//java/com/google/gerrit/httpd/auth/openid",
"//java/com/google/gerrit/index:query_exception",
"//java/com/google/gerrit/lifecycle",
"//java/com/google/gerrit/pgm:daemon",
"//java/com/google/gerrit/pgm/http/jetty",
"//java/com/google/gerrit/pgm/util",
"//lib:jimfs",
"//lib:truth",
"//lib:truth-java8-extension",

View File

@ -9,9 +9,6 @@ java_library(
exports = [
"//gerrit-acceptance-framework:lib",
"//gerrit-launcher:launcher",
"//gerrit-pgm:init",
"//gerrit-pgm:pgm",
"//gerrit-pgm:util",
"//gerrit-server:receive",
"//gerrit-server:server",
"//gerrit-server:testutil",
@ -24,6 +21,9 @@ java_library(
"//java/com/google/gerrit/httpd",
"//java/com/google/gerrit/lucene",
"//java/com/google/gerrit/metrics",
"//java/com/google/gerrit/pgm",
"//java/com/google/gerrit/pgm/init",
"//java/com/google/gerrit/pgm/util",
"//java/com/google/gerrit/reviewdb:server",
"//java/com/google/gerrit/sshd",
"//lib:args4j",

View File

@ -3,9 +3,8 @@ java_library(
srcs = glob(["src/main/java/**/*.java"]),
visibility = ["//visibility:public"],
deps = [
"//gerrit-pgm:daemon",
"//gerrit-pgm:pgm",
"//gerrit-pgm:util",
"//java/com/google/gerrit/pgm",
"//java/com/google/gerrit/pgm/util",
"//java/com/google/gerrit/util/cli",
"//lib/gwt:dev",
"//lib/jetty:server",

View File

@ -1,182 +0,0 @@
load("//tools/bzl:java.bzl", "java_library2")
load("//tools/bzl:junit.bzl", "junit_tests")
load("//tools/bzl:license.bzl", "license_test")
SRCS = "src/main/java/com/google/gerrit/pgm/"
RSRCS = "src/main/resources/com/google/gerrit/pgm/"
INIT_API_SRCS = glob([SRCS + "init/api/*.java"])
BASE_JETTY_DEPS = [
"//java/com/google/gerrit/common:annotations",
"//java/com/google/gerrit/common:server",
"//java/com/google/gerrit/extensions:api",
"//java/com/google/gerrit/httpd",
"//java/com/google/gerrit/lifecycle",
"//java/com/google/gerrit/sshd",
"//java/com/google/gwtexpui/linker:server",
"//java/com/google/gwtexpui/server",
"//gerrit-server:server",
"//lib:guava",
"//lib/guice:guice",
"//lib/guice:guice-assistedinject",
"//lib/guice:guice-servlet",
"//lib/jgit/org.eclipse.jgit:jgit",
"//lib/log:api",
"//lib/log:log4j",
]
DEPS = BASE_JETTY_DEPS + [
"//java/com/google/gerrit/metrics",
"//java/com/google/gerrit/metrics/dropwizard",
"//java/com/google/gerrit/reviewdb:server",
"//gerrit-server:module",
"//gerrit-server:receive",
"//lib:gwtorm",
"//lib/log:jsonevent-layout",
]
java_library(
name = "init-api",
srcs = INIT_API_SRCS,
visibility = ["//visibility:public"],
deps = DEPS,
)
java_library(
name = "init",
srcs = glob([SRCS + "init/**/*.java"]),
resources = glob([RSRCS + "init/*"]),
visibility = ["//visibility:public"],
deps = DEPS + [
":init-api",
":util",
"//java/com/google/gerrit/elasticsearch",
"//java/com/google/gerrit/index",
"//java/com/google/gerrit/lucene",
"//gerrit-launcher:launcher", # We want this dep to be provided_deps
"//lib:args4j",
"//lib:derby",
"//lib:gwtjsonrpc",
"//lib:h2",
"//lib/commons:validator",
"//lib/mina:sshd",
],
)
REST_UTIL_DEPS = [
"//java/com/google/gerrit/server/cache/h2",
"//java/com/google/gerrit/util/cli",
"//lib:args4j",
"//lib/commons:dbcp",
]
java_library(
name = "util",
visibility = ["//visibility:public"],
exports = [":util-nodep"],
runtime_deps = DEPS + REST_UTIL_DEPS,
)
java_library(
name = "util-nodep",
srcs = glob([SRCS + "util/*.java"]),
visibility = ["//visibility:public"],
deps = DEPS + REST_UTIL_DEPS, # We want all these deps to be provided_deps
)
JETTY_DEPS = [
"//lib/jetty:jmx",
"//lib/jetty:server",
"//lib/jetty:servlet",
]
java_library(
name = "http",
visibility = ["//visibility:public"],
exports = [":http-jetty"],
runtime_deps = DEPS + JETTY_DEPS,
)
java_library(
name = "http-jetty",
srcs = glob([SRCS + "http/jetty/*.java"]),
visibility = ["//visibility:public"],
deps = JETTY_DEPS + BASE_JETTY_DEPS + [
# We want all these deps to be provided_deps
"//gerrit-launcher:launcher",
"//java/com/google/gerrit/reviewdb:client",
"//lib:servlet-api-3_1",
],
)
REST_PGM_DEPS = [
":http",
":init",
":init-api",
":util",
"//java/com/google/gerrit/elasticsearch",
"//java/com/google/gerrit/gpg",
"//java/com/google/gerrit/httpd/auth/oauth",
"//java/com/google/gerrit/httpd/auth/openid",
"//java/com/google/gerrit/server/cache/h2",
"//java/com/google/gerrit/index",
"//java/com/google/gerrit/lucene",
"//lib:args4j",
"//lib:protobuf",
"//lib:servlet-api-3_1-without-neverlink",
"//lib/prolog:cafeteria",
"//lib/prolog:compiler",
"//lib/prolog:runtime",
]
java_library(
name = "pgm",
resources = glob([RSRCS + "*"]),
visibility = ["//visibility:public"],
runtime_deps = DEPS + REST_PGM_DEPS + [
":daemon",
],
)
# no transitive deps, used for gerrit-acceptance-framework
java_library(
name = "daemon",
srcs = glob([
SRCS + "*.java",
SRCS + "rules/*.java",
]),
resources = glob([RSRCS + "*"]),
visibility = ["//visibility:public"],
deps = DEPS + REST_PGM_DEPS + [
# We want all these deps to be provided_deps
"//gerrit-launcher:launcher",
"//lib/auto:auto-value",
],
)
junit_tests(
name = "pgm_tests",
srcs = glob(["src/test/java/**/*.java"]),
deps = [
":http-jetty",
":init",
":init-api",
":pgm",
"//gerrit-server:server",
"//java/com/google/gerrit/common:server",
"//lib:guava",
"//lib:junit",
"//lib:truth",
"//lib/easymock",
"//lib/guice",
"//lib/jgit/org.eclipse.jgit:jgit",
"//lib/jgit/org.eclipse.jgit.junit:junit",
],
)
license_test(
name = "pgm_license_test",
target = ":pgm",
)

View File

@ -1,5 +1,5 @@
PLUGIN_API = [
"//gerrit-pgm:init-api",
"//java/com/google/gerrit/pgm/init/api",
"//gerrit-server:server",
"//java/com/google/gerrit/httpd",
"//java/com/google/gerrit/sshd",
@ -77,7 +77,6 @@ java_binary(
main_class = "Dummy",
visibility = ["//visibility:public"],
runtime_deps = [
"//gerrit-pgm:libinit-api-src.jar",
"//gerrit-server:libserver-src.jar",
"//java/com/google/gerrit/common:libannotations-src.jar",
"//java/com/google/gerrit/common:libserver-src.jar",
@ -86,6 +85,7 @@ java_binary(
"//java/com/google/gerrit/index:libindex-src.jar",
"//java/com/google/gerrit/index:libquery_exception-src.jar",
"//java/com/google/gerrit/index:libquery_parser-src.jar",
"//java/com/google/gerrit/pgm/init/api:libapi-src.jar",
"//java/com/google/gerrit/reviewdb:libserver-src.jar",
"//java/com/google/gerrit/sshd:libsshd-src.jar",
"//java/com/google/gwtexpui/server:libserver-src.jar",

View File

@ -180,7 +180,7 @@ java_library(
"//lib/powermock:powermock-module-junit4-common",
],
deps = TESTUTIL_DEPS + [
"//gerrit-pgm:init",
"//java/com/google/gerrit/pgm/init",
"//lib/auto:auto-value",
"//lib/easymock:easymock",
"//lib/powermock:powermock-api-easymock",

View File

@ -5,10 +5,6 @@ java_library(
srcs = glob(["src/main/java/**/*.java"]),
visibility = ["//visibility:public"],
deps = [
"//gerrit-pgm:http",
"//gerrit-pgm:init",
"//gerrit-pgm:init-api",
"//gerrit-pgm:util",
"//gerrit-server:module",
"//gerrit-server:receive",
"//gerrit-server:server",
@ -21,6 +17,10 @@ java_library(
"//java/com/google/gerrit/lifecycle",
"//java/com/google/gerrit/lucene",
"//java/com/google/gerrit/metrics/dropwizard",
"//java/com/google/gerrit/pgm/http",
"//java/com/google/gerrit/pgm/init",
"//java/com/google/gerrit/pgm/init/api",
"//java/com/google/gerrit/pgm/util",
"//java/com/google/gerrit/reviewdb:server",
"//java/com/google/gerrit/server/cache/h2",
"//java/com/google/gerrit/sshd",

View File

@ -0,0 +1,60 @@
# TODO(davido): This indirection doesn't avoid unwanted depdencies
# in acceptance-framework and should be removed. Instead, provided_deps
# should be used, once https://github.com/bazelbuild/bazel/issues/1402
# is fixed.
alias(
name = "pgm",
actual = ":daemon",
visibility = ["//visibility:public"],
)
java_library(
name = "daemon",
srcs = glob(["**/*.java"]),
resource_strip_prefix = "resources",
resources = ["//resources/com/google/gerrit/pgm"],
visibility = ["//visibility:public"],
deps = [
"//gerrit-launcher:launcher",
"//gerrit-server:module",
"//gerrit-server:receive",
"//gerrit-server:server",
"//java/com/google/gerrit/common:annotations",
"//java/com/google/gerrit/common:server",
"//java/com/google/gerrit/elasticsearch",
"//java/com/google/gerrit/extensions:api",
"//java/com/google/gerrit/gpg",
"//java/com/google/gerrit/httpd",
"//java/com/google/gerrit/httpd/auth/oauth",
"//java/com/google/gerrit/httpd/auth/openid",
"//java/com/google/gerrit/index",
"//java/com/google/gerrit/lifecycle",
"//java/com/google/gerrit/lucene",
"//java/com/google/gerrit/metrics/dropwizard",
"//java/com/google/gerrit/pgm/http",
"//java/com/google/gerrit/pgm/init",
"//java/com/google/gerrit/pgm/init/api",
"//java/com/google/gerrit/pgm/util",
"//java/com/google/gerrit/reviewdb:server",
"//java/com/google/gerrit/server/cache/h2",
"//java/com/google/gerrit/sshd",
"//java/com/google/gwtexpui/linker:server",
"//java/com/google/gwtexpui/server",
"//lib:args4j",
"//lib:guava",
"//lib:gwtorm",
"//lib:protobuf",
"//lib:servlet-api-3_1-without-neverlink",
"//lib/auto:auto-value",
"//lib/guice",
"//lib/guice:guice-assistedinject",
"//lib/guice:guice-servlet",
"//lib/jgit/org.eclipse.jgit:jgit",
"//lib/log:api",
"//lib/log:jsonevent-layout",
"//lib/log:log4j",
"//lib/prolog:cafeteria",
"//lib/prolog:compiler",
"//lib/prolog:runtime",
],
)

View File

@ -0,0 +1,5 @@
java_library(
name = "http",
visibility = ["//visibility:public"],
exports = ["//java/com/google/gerrit/pgm/http/jetty"],
)

View File

@ -0,0 +1,26 @@
java_library(
name = "jetty",
srcs = glob(["**/*.java"]),
visibility = ["//visibility:public"],
deps = [
"//gerrit-launcher:launcher",
"//gerrit-server:server",
"//java/com/google/gerrit/common:server",
"//java/com/google/gerrit/extensions:api",
"//java/com/google/gerrit/httpd",
"//java/com/google/gerrit/lifecycle",
"//java/com/google/gerrit/sshd",
"//java/com/google/gwtexpui/server",
"//lib:guava",
"//lib:servlet-api-3_1",
"//lib/guice",
"//lib/guice:guice-assistedinject",
"//lib/guice:guice-servlet",
"//lib/jetty:jmx",
"//lib/jetty:server",
"//lib/jetty:servlet",
"//lib/jgit/org.eclipse.jgit:jgit",
"//lib/log:api",
"//lib/log:log4j",
],
)

View File

@ -0,0 +1,30 @@
java_library(
name = "init",
srcs = glob(["**/*.java"]),
resource_strip_prefix = "resources",
resources = ["//resources/com/google/gerrit/pgm/init"],
visibility = ["//visibility:public"],
deps = [
"//gerrit-launcher:launcher",
"//gerrit-server:server",
"//java/com/google/gerrit/common:annotations",
"//java/com/google/gerrit/common:server",
"//java/com/google/gerrit/elasticsearch",
"//java/com/google/gerrit/extensions:api",
"//java/com/google/gerrit/index",
"//java/com/google/gerrit/lucene",
"//java/com/google/gerrit/metrics",
"//java/com/google/gerrit/pgm/init/api",
"//java/com/google/gerrit/pgm/util",
"//java/com/google/gerrit/reviewdb:server",
"//lib:guava",
"//lib:gwtjsonrpc",
"//lib:gwtorm",
"//lib:h2",
"//lib/commons:validator",
"//lib/guice",
"//lib/guice:guice-assistedinject",
"//lib/jgit/org.eclipse.jgit:jgit",
"//lib/log:api",
],
)

View File

@ -0,0 +1,17 @@
java_library(
name = "api",
srcs = glob(["**/*.java"]),
visibility = ["//visibility:public"],
deps = [
"//gerrit-server:server",
"//java/com/google/gerrit/common:annotations",
"//java/com/google/gerrit/common:server",
"//java/com/google/gerrit/reviewdb:server",
"//lib:guava",
"//lib:gwtorm",
"//lib/guice",
"//lib/guice:guice-assistedinject",
"//lib/jgit/org.eclipse.jgit:jgit",
"//lib/log:api",
],
)

Some files were not shown because too many files have changed in this diff Show More