Browse Source

Bazel: Use hyphen instead of underscore in external repository names

Recent Bazel versions support the hyphen character in external
repository names. On the Gerrit project, the repository names
were harmonized to consistently use hyphen.

As a side effect, it is no longer possible to build jgit from source
in the gerrit tree, due to the different repository names.

Rename the dependencies to use hyphens, consistent with gerrit.

Change-Id: Ideebd858ddd3f0e6f765643001642dfb6c12441f
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
stable-5.2
David Pursehouse 6 years ago
parent
commit
19222ce7c4
  1. 30
      WORKSPACE
  2. 30
      lib/BUILD

30
WORKSPACE

@ -40,43 +40,43 @@ maven_jar(
) )
maven_jar( maven_jar(
name = "commons_codec", name = "commons-codec",
artifact = "commons-codec:commons-codec:1.10", artifact = "commons-codec:commons-codec:1.10",
sha1 = "4b95f4897fa13f2cd904aee711aeafc0c5295cd8", sha1 = "4b95f4897fa13f2cd904aee711aeafc0c5295cd8",
) )
maven_jar( maven_jar(
name = "commons_logging", name = "commons-logging",
artifact = "commons-logging:commons-logging:1.2", artifact = "commons-logging:commons-logging:1.2",
sha1 = "4bfc12adfe4842bf07b657f0369c4cb522955686", sha1 = "4bfc12adfe4842bf07b657f0369c4cb522955686",
) )
maven_jar( maven_jar(
name = "log_api", name = "log-api",
artifact = "org.slf4j:slf4j-api:1.7.2", artifact = "org.slf4j:slf4j-api:1.7.2",
sha1 = "0081d61b7f33ebeab314e07de0cc596f8e858d97", sha1 = "0081d61b7f33ebeab314e07de0cc596f8e858d97",
) )
maven_jar( maven_jar(
name = "slf4j_simple", name = "slf4j-simple",
artifact = "org.slf4j:slf4j-simple:1.7.2", artifact = "org.slf4j:slf4j-simple:1.7.2",
sha1 = "760055906d7353ba4f7ce1b8908bc6b2e91f39fa", sha1 = "760055906d7353ba4f7ce1b8908bc6b2e91f39fa",
) )
maven_jar( maven_jar(
name = "servlet_api_3_1", name = "servlet-api-3_1",
artifact = "javax.servlet:javax.servlet-api:3.1.0", artifact = "javax.servlet:javax.servlet-api:3.1.0",
sha1 = "3cd63d075497751784b2fa84be59432f4905bf7c", sha1 = "3cd63d075497751784b2fa84be59432f4905bf7c",
) )
maven_jar( maven_jar(
name = "commons_compress", name = "commons-compress",
artifact = "org.apache.commons:commons-compress:1.15", artifact = "org.apache.commons:commons-compress:1.15",
sha1 = "b686cd04abaef1ea7bc5e143c080563668eec17e", sha1 = "b686cd04abaef1ea7bc5e143c080563668eec17e",
) )
maven_jar( maven_jar(
name = "tukaani_xz", name = "tukaani-xz",
artifact = "org.tukaani:xz:1.6", artifact = "org.tukaani:xz:1.6",
sha1 = "05b6f921f1810bdf90e25471968f741f87168b64", sha1 = "05b6f921f1810bdf90e25471968f741f87168b64",
) )
@ -94,13 +94,13 @@ maven_jar(
) )
maven_jar( maven_jar(
name = "hamcrest_library", name = "hamcrest-library",
artifact = "org.hamcrest:hamcrest-library:1.3", artifact = "org.hamcrest:hamcrest-library:1.3",
sha1 = "4785a3c21320980282f9f33d0d1264a69040538f", sha1 = "4785a3c21320980282f9f33d0d1264a69040538f",
) )
maven_jar( maven_jar(
name = "hamcrest_core", name = "hamcrest-core",
artifact = "org.hamcrest:hamcrest-core:1.3", artifact = "org.hamcrest:hamcrest-core:1.3",
sha1 = "42a25dc3219429f0e5d060061f71acb49bf010a0", sha1 = "42a25dc3219429f0e5d060061f71acb49bf010a0",
) )
@ -114,42 +114,42 @@ maven_jar(
JETTY_VER = "9.4.11.v20180605" JETTY_VER = "9.4.11.v20180605"
maven_jar( maven_jar(
name = "jetty_servlet", name = "jetty-servlet",
artifact = "org.eclipse.jetty:jetty-servlet:" + JETTY_VER, artifact = "org.eclipse.jetty:jetty-servlet:" + JETTY_VER,
sha1 = "66d31900fcfc70e3666f0b3335b6660635154f98", sha1 = "66d31900fcfc70e3666f0b3335b6660635154f98",
src_sha1 = "930c50de49b9c258d5f0329426cbcac4d3143497", src_sha1 = "930c50de49b9c258d5f0329426cbcac4d3143497",
) )
maven_jar( maven_jar(
name = "jetty_security", name = "jetty-security",
artifact = "org.eclipse.jetty:jetty-security:" + JETTY_VER, artifact = "org.eclipse.jetty:jetty-security:" + JETTY_VER,
sha1 = "926def86d31ee07ca4b4658833dc6ee6918b8e86", sha1 = "926def86d31ee07ca4b4658833dc6ee6918b8e86",
src_sha1 = "019bc7c2a366cbb201950f24dd64d9d9a49b6840", src_sha1 = "019bc7c2a366cbb201950f24dd64d9d9a49b6840",
) )
maven_jar( maven_jar(
name = "jetty_server", name = "jetty-server",
artifact = "org.eclipse.jetty:jetty-server:" + JETTY_VER, artifact = "org.eclipse.jetty:jetty-server:" + JETTY_VER,
sha1 = "58353c2f27515b007fc83ae22002feb34fc24714", sha1 = "58353c2f27515b007fc83ae22002feb34fc24714",
src_sha1 = "e7d832d74df616137755996b41bc28bb82b3bc42", src_sha1 = "e7d832d74df616137755996b41bc28bb82b3bc42",
) )
maven_jar( maven_jar(
name = "jetty_http", name = "jetty-http",
artifact = "org.eclipse.jetty:jetty-http:" + JETTY_VER, artifact = "org.eclipse.jetty:jetty-http:" + JETTY_VER,
sha1 = "20c35f5336befe35b0bd5c4a63e07170fe7872d7", sha1 = "20c35f5336befe35b0bd5c4a63e07170fe7872d7",
src_sha1 = "5bc30d1f7e8c4456c22cc85999b8cafd3741bdff", src_sha1 = "5bc30d1f7e8c4456c22cc85999b8cafd3741bdff",
) )
maven_jar( maven_jar(
name = "jetty_io", name = "jetty-io",
artifact = "org.eclipse.jetty:jetty-io:" + JETTY_VER, artifact = "org.eclipse.jetty:jetty-io:" + JETTY_VER,
sha1 = "d164de1dac18c4ca80a1b783d879c97449909c3b", sha1 = "d164de1dac18c4ca80a1b783d879c97449909c3b",
src_sha1 = "02c0caba292b1cb74cec1d36c6f91dc863c89b5a", src_sha1 = "02c0caba292b1cb74cec1d36c6f91dc863c89b5a",
) )
maven_jar( maven_jar(
name = "jetty_util", name = "jetty-util",
artifact = "org.eclipse.jetty:jetty-util:" + JETTY_VER, artifact = "org.eclipse.jetty:jetty-util:" + JETTY_VER,
sha1 = "f0f25aa2f27d618a04bc7356fa247ae4a05245b3", sha1 = "f0f25aa2f27d618a04bc7356fa247ae4a05245b3",
src_sha1 = "4e5c4c483cfd9804c2fc5d5751866243bbb9d740", src_sha1 = "4e5c4c483cfd9804c2fc5d5751866243bbb9d740",

30
lib/BUILD

@ -13,19 +13,19 @@ java_library(
"//org.eclipse.jgit.archive:__pkg__", "//org.eclipse.jgit.archive:__pkg__",
"//org.eclipse.jgit.pgm.test:__pkg__", "//org.eclipse.jgit.pgm.test:__pkg__",
], ],
exports = ["@commons_compress//jar"], exports = ["@commons-compress//jar"],
) )
java_library( java_library(
name = "commons-codec", name = "commons-codec",
exports = ["@commons_codec//jar"], exports = ["@commons-codec//jar"],
) )
java_library( java_library(
name = "commons-logging", name = "commons-logging",
testonly = 1, testonly = 1,
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
exports = ["@commons_logging//jar"], exports = ["@commons-logging//jar"],
) )
java_library( java_library(
@ -69,7 +69,7 @@ java_library(
name = "jetty-http", name = "jetty-http",
# TODO: This should be testonly but org.eclipse.jgit.pgm depends on it. # TODO: This should be testonly but org.eclipse.jgit.pgm depends on it.
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
exports = ["@jetty_http//jar"], exports = ["@jetty-http//jar"],
runtime_deps = [":commons-codec"], runtime_deps = [":commons-codec"],
) )
@ -77,35 +77,35 @@ java_library(
name = "jetty-io", name = "jetty-io",
# TODO: This should be testonly but org.eclipse.jgit.pgm depends on it. # TODO: This should be testonly but org.eclipse.jgit.pgm depends on it.
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
exports = ["@jetty_io//jar"], exports = ["@jetty-io//jar"],
) )
java_library( java_library(
name = "jetty-security", name = "jetty-security",
# TODO: This should be testonly but org.eclipse.jgit.pgm depends on it. # TODO: This should be testonly but org.eclipse.jgit.pgm depends on it.
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
exports = ["@jetty_security//jar"], exports = ["@jetty-security//jar"],
) )
java_library( java_library(
name = "jetty-server", name = "jetty-server",
# TODO: This should be testonly but org.eclipse.jgit.pgm depends on it. # TODO: This should be testonly but org.eclipse.jgit.pgm depends on it.
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
exports = ["@jetty_server//jar"], exports = ["@jetty-server//jar"],
) )
java_library( java_library(
name = "jetty-servlet", name = "jetty-servlet",
# TODO: This should be testonly but org.eclipse.jgit.pgm depends on it. # TODO: This should be testonly but org.eclipse.jgit.pgm depends on it.
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
exports = ["@jetty_servlet//jar"], exports = ["@jetty-servlet//jar"],
) )
java_library( java_library(
name = "jetty-util", name = "jetty-util",
# TODO: This should be testonly but org.eclipse.jgit.pgm depends on it. # TODO: This should be testonly but org.eclipse.jgit.pgm depends on it.
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
exports = ["@jetty_util//jar"], exports = ["@jetty-util//jar"],
) )
java_library( java_library(
@ -131,8 +131,8 @@ java_library(
testonly = 1, testonly = 1,
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
exports = [ exports = [
"@hamcrest_core//jar", "@hamcrest-core//jar",
"@hamcrest_library//jar", "@hamcrest-library//jar",
"@junit//jar", "@junit//jar",
], ],
) )
@ -148,25 +148,25 @@ java_library(
"//org.eclipse.jgit.lfs.server.test:__pkg__", "//org.eclipse.jgit.lfs.server.test:__pkg__",
"//org.eclipse.jgit.pgm:__pkg__", "//org.eclipse.jgit.pgm:__pkg__",
], ],
exports = ["@servlet_api_3_1//jar"], exports = ["@servlet-api-3_1//jar"],
) )
java_library( java_library(
name = "slf4j-api", name = "slf4j-api",
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
exports = ["@log_api//jar"], exports = ["@log-api//jar"],
) )
java_library( java_library(
name = "slf4j-simple", name = "slf4j-simple",
testonly = 1, testonly = 1,
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
exports = ["@slf4j_simple//jar"], exports = ["@slf4j-simple//jar"],
) )
java_library( java_library(
name = "xz", name = "xz",
testonly = 1, testonly = 1,
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
exports = ["@tukaani_xz//jar"], exports = ["@tukaani-xz//jar"],
) )

Loading…
Cancel
Save