This is an automated email from the ASF dual-hosted git repository.
ibzib pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new be451b0 [BEAM-10961] enable strict dependency checking for
sdks/java/io/kafka (#14057)
be451b0 is described below
commit be451b01e39e5729d5de2d974085b4545122a908
Author: shehzaadn-vd <[email protected]>
AuthorDate: Wed Feb 24 09:13:19 2021 -0800
[BEAM-10961] enable strict dependency checking for sdks/java/io/kafka
(#14057)
* [BEAM-10961] enable strict dependency checking for sdks/java/io/kafka
* [BEAM-10961] (1) fix spacing (2) remove kafka-clients dependency (3) add
reference to BEAM-11761
* Trigger Build
---
sdks/java/io/kafka/build.gradle | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/sdks/java/io/kafka/build.gradle b/sdks/java/io/kafka/build.gradle
index a500ddd..51bb13e 100644
--- a/sdks/java/io/kafka/build.gradle
+++ b/sdks/java/io/kafka/build.gradle
@@ -20,6 +20,7 @@ import java.util.stream.Collectors
plugins { id 'org.apache.beam.module' }
applyJavaNature(
+ enableStrictDependencies: true,
automaticModuleName: 'org.apache.beam.sdk.io.kafka',
mavenRepositories: [
[id: 'io.confluent', url: 'https://packages.confluent.io/maven/']
@@ -49,6 +50,8 @@ dependencies {
compile library.java.vendored_guava_26_0_jre
compile project(path: ":sdks:java:core", configuration: "shadow")
compile project(":sdks:java:expansion-service")
+ permitUnusedDeclared project(":sdks:java:expansion-service") // BEAM-11761
+ compile library.java.avro
// Get back to "provided" since 2.14
provided library.java.kafka_clients
compile library.java.slf4j_api
@@ -57,6 +60,13 @@ dependencies {
compile library.java.jackson_databind
compile "org.springframework:spring-expression:4.3.18.RELEASE"
compile ("io.confluent:kafka-avro-serializer:5.3.2") {
+ // zookeeper depends on "spotbugs-annotations:3.1.9" which clashes with
current
+ // "spotbugs-annotations:3.1.12" used in Beam. Not required.
+ exclude group: "org.apache.zookeeper", module: "zookeeper"
+ // "kafka-clients" has to be provided since user can use its own version.
+ exclude group: "org.apache.kafka", module: "kafka-clients"
+ }
+ compile ("io.confluent:kafka-schema-registry-client:5.3.2") {
// It depends on "spotbugs-annotations:3.1.9" which clashes with current
// "spotbugs-annotations:3.1.12" used in Beam. Not required.
exclude group: "org.apache.zookeeper", module: "zookeeper"
@@ -71,8 +81,6 @@ dependencies {
// For testing Cross-language transforms
testCompile project(":runners:core-construction-java")
testCompile library.java.avro
- testCompile library.java.hamcrest_core
- testCompile library.java.hamcrest_library
testCompile library.java.junit
testCompile library.java.powermock
testCompile library.java.powermock_mockito