Consume events-broker from source
Also amend the README.md with the explicit mention to the events-broker
as pre-requisite for building the plugin.
Change-Id: Id937664c15069e9f6452514583ae13f43ad0c9f6
diff --git a/BUILD b/BUILD
index 8889c80..6e88b11 100644
--- a/BUILD
+++ b/BUILD
@@ -17,8 +17,8 @@
],
resources = glob(["src/main/resources/**/*"]),
deps = [
+ ":events-broker-neverlink",
"//lib/httpcomponents:httpclient",
- "@events-broker//jar",
"@httpasyncclient//jar",
"@httpcore-nio//jar",
"@kafka-client//jar",
@@ -34,7 +34,7 @@
deps = [
":events-kafka__plugin_test_deps",
"//lib/testcontainers",
- "@events-broker//jar",
+ "//plugins/events-broker",
"@kafka-client//jar",
"@testcontainers-kafka//jar",
],
@@ -53,3 +53,9 @@
"//lib/testcontainers:docker-java-transport",
],
)
+
+java_library(
+ name = "events-broker-neverlink",
+ neverlink = 1,
+ exports = ["//plugins/events-broker"],
+)
diff --git a/README.md b/README.md
index 781ed57..26e7ebf 100644
--- a/README.md
+++ b/README.md
@@ -29,11 +29,15 @@
---------------------
Kafka plugin can be build as a regular 'in-tree' plugin. That means that is required to
clone a Gerrit source tree first and then to have the Kafka plugin source directory into
-the /plugins path. Additionally, the plugins/external_plugin_deps.bzl file needs to be
+the /plugins path. The plugin depends on [events-broker](https://gerrit.googlesource.com/modules/events-broker)
+which is linked directly from source with the same 'in-tree' plugin structure.
+
+Additionally, the plugins/external_plugin_deps.bzl file needs to be
updated to match the Kafka plugin one.
git clone --recursive https://gerrit.googlesource.com/gerrit
git clone https://gerrit.googlesource.com/plugins/events-kafka gerrit/plugins/events-kafka
+ git clone https://gerrit.googlesource.com/modules/events-broker gerrit/plugins/events-broker
cd gerrit
rm plugins/external_plugin_deps.bzl
ln -s ./events-kafka/external_plugin_deps.bzl plugins/.
@@ -45,6 +49,7 @@
The output is created in
bazel-genfiles/plugins/events-kafka/events-kafka.jar
+ bazel-genfiles/plugins/events-broker/events-broker.jar
Minimum Configuration
---------------------
diff --git a/external_plugin_deps.bzl b/external_plugin_deps.bzl
index 88a49ab..db9da3a 100644
--- a/external_plugin_deps.bzl
+++ b/external_plugin_deps.bzl
@@ -12,9 +12,3 @@
artifact = "org.testcontainers:kafka:1.15.0",
sha1 = "d34760b11ab656e08b72c1e2e9b852f037a89f90",
)
-
- maven_jar(
- name = "events-broker",
- artifact = "com.gerritforge:events-broker:3.4.0.4",
- sha1 = "8d361d863382290e33828116e65698190118d0f1",
- )