414659c792
Rather than serving a static file, serve the PolyGerrit index HTML document from a Soy template. In this way, the path to load PG dependencies can be safely parameterized in two ways: * If Gerrit is not running on the root of the domain (e.g. listening on https://example.com/my-gerrit/) the path component of the Canonical Web URL is used to load PG dependencies. Instead of /elements/gr-app.js off the root of the domain it uses /my-gerrit/elements/gr-app.js * If the PolyGerrit static resources are to be served from a CDN rather than the Gerrit WAR, the `cdnPath` config in the [gerrit] section can be used. For example, if the server config says ... [gerrit] cdnPath = http://my-cdn.com/pg/version/123 ... then it uses the following style of path for PG dependencies. http://my-cdn.com/pg/version/123/my-gerrit/elements/gr-app.js If a CDN-path is configured, it supersedes subdirectories appearing in the Canonical-Web-URL for this purpose. Feature: Issue 5845 Change-Id: I2b2d704fe33c90ea2f2a2183fc79897642a48175
81 lines
2.2 KiB
Python
81 lines
2.2 KiB
Python
package(
|
|
default_visibility = ["//visibility:public"],
|
|
)
|
|
|
|
load("//tools/bzl:junit.bzl", "junit_tests")
|
|
|
|
SRCS = glob(
|
|
["src/main/java/**/*.java"],
|
|
)
|
|
|
|
RESOURCES = glob(["src/main/resources/**/*"])
|
|
|
|
java_library(
|
|
name = "httpd",
|
|
srcs = SRCS,
|
|
resources = RESOURCES,
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//gerrit-antlr:query_exception",
|
|
"//gerrit-common:annotations",
|
|
"//gerrit-common:server",
|
|
"//gerrit-extension-api:api",
|
|
"//gerrit-gwtexpui:linker_server",
|
|
"//gerrit-gwtexpui:server",
|
|
"//gerrit-launcher:launcher",
|
|
"//gerrit-patch-jgit:server",
|
|
"//gerrit-prettify:server",
|
|
"//gerrit-reviewdb:server",
|
|
"//gerrit-server:server",
|
|
"//gerrit-util-cli:cli",
|
|
"//gerrit-util-http:http",
|
|
"//lib:args4j",
|
|
"//lib:gson",
|
|
"//lib:guava",
|
|
"//lib:gwtjsonrpc",
|
|
"//lib:gwtorm",
|
|
"//lib:jsch",
|
|
"//lib:mime-util",
|
|
"//lib:servlet-api-3_1",
|
|
"//lib:soy",
|
|
"//lib/auto:auto-value",
|
|
"//lib/commons:codec",
|
|
"//lib/guice",
|
|
"//lib/guice:guice-assistedinject",
|
|
"//lib/guice:guice-servlet",
|
|
"//lib/jgit/org.eclipse.jgit.http.server:jgit-servlet",
|
|
"//lib/jgit/org.eclipse.jgit:jgit",
|
|
"//lib/log:api",
|
|
"//lib/lucene:lucene-core-and-backward-codecs",
|
|
],
|
|
)
|
|
|
|
junit_tests(
|
|
name = "httpd_tests",
|
|
srcs = glob(["src/test/java/**/*.java"]),
|
|
deps = [
|
|
":httpd",
|
|
"//gerrit-common:annotations",
|
|
"//gerrit-common:server",
|
|
"//gerrit-extension-api:api",
|
|
"//gerrit-reviewdb:server",
|
|
"//gerrit-server:server",
|
|
"//gerrit-util-http:http",
|
|
"//gerrit-util-http:testutil",
|
|
"//lib:gson",
|
|
"//lib:guava",
|
|
"//lib:gwtorm",
|
|
"//lib:jimfs",
|
|
"//lib:junit",
|
|
"//lib:servlet-api-3_1-without-neverlink",
|
|
"//lib:soy",
|
|
"//lib:truth",
|
|
"//lib/easymock",
|
|
"//lib/guice",
|
|
"//lib/guice:guice-servlet",
|
|
"//lib/jgit/org.eclipse.jgit:jgit",
|
|
"//lib/jgit/org.eclipse.jgit.junit:junit",
|
|
"//lib/joda:joda-time",
|
|
],
|
|
)
|