Consume events-broker from source Also amend the Build.md with the explicit mention to the events-broker as pre-requisite for building the plugin. Change-Id: If6aa68e370c874a5d8312a69e8b39b02f9d6ddd8
diff --git a/BUILD b/BUILD index fbbd1d6..5f395ca 100644 --- a/BUILD +++ b/BUILD
@@ -18,6 +18,7 @@ ], resources = glob(["src/main/resources/**/*"]), deps = [ + ":events-broker-neverlink", "@amazon-auth//jar", "@amazon-aws-core//jar", "@amazon-cloudwatch//jar", @@ -41,7 +42,6 @@ "@awssdk-protocol-core//jar", "@awssdk-query-protocol//jar", "@commons-codec//jar", - "@events-broker//jar:neverlink", "@io-netty-all//jar", "@jackson-annotations//jar", "@jackson-databind//jar", @@ -61,11 +61,11 @@ deps = [ ":events-aws-kinesis__plugin_test_deps", "//lib/testcontainers", + "//plugins/events-broker", "@amazon-http-client-spi//jar", "@amazon-kinesis-client//jar", "@amazon-kinesis//jar", "@awssdk-kinesis-producer//jar", - "@events-broker//jar", ], ) @@ -91,3 +91,9 @@ "@testcontainer-localstack//jar", ], ) + +java_library( + name = "events-broker-neverlink", + neverlink = 1, + exports = ["//plugins/events-broker"], +)
diff --git a/Jenkinsfile b/Jenkinsfile index a32db2b..b7f3090 100644 --- a/Jenkinsfile +++ b/Jenkinsfile
@@ -1,2 +1,3 @@ pluginPipeline(formatCheckId: 'gerritforge:plugins-events-aws-kinesis-code-style', - buildCheckId: 'gerritforge:plugins-events-aws-kinesis-build-test') + buildCheckId: 'gerritforge:plugins-events-aws-kinesis-build-test', + extraModules: ['events-broker'])
diff --git a/external_plugin_deps.bzl b/external_plugin_deps.bzl index 388a15e..f2fc36a 100644 --- a/external_plugin_deps.bzl +++ b/external_plugin_deps.bzl
@@ -108,12 +108,6 @@ ) maven_jar( - name = "events-broker", - artifact = "com.gerritforge:events-broker:3.4.0.4", - sha1 = "8d361d863382290e33828116e65698190118d0f1", - ) - - maven_jar( name = "io-netty-all", artifact = "io.netty:netty-all:4.1.51.Final", sha1 = "5e5f741acc4c211ac4572c31c7e5277ec465e4e4",
diff --git a/src/main/resources/Documentation/Build.md b/src/main/resources/Documentation/Build.md index ffb8b0c..f2bb4d7 100644 --- a/src/main/resources/Documentation/Build.md +++ b/src/main/resources/Documentation/Build.md
@@ -2,7 +2,8 @@ The events-aws-kinesis 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 plugin -source directory into the `/plugins` path. +source directory into 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 events-aws-kinesis plugin one. @@ -11,6 +12,7 @@ git clone --recursive https://gerrit.googlesource.com/gerrit cd gerrit git clone "https://gerrit.googlesource.com/plugins/events-aws-kinesis" plugins/events-aws-kinesis +git clone "https://gerrit.googlesource.com/modules/events-broker" plugins/events-broker ln -sf plugins/events-aws-kinesis/external_plugin_deps.bzl plugins/. bazelisk build plugins/events-aws-kinesis ```