From f21f966f37e086728b27af4acb94c1d70ae99ff4 Mon Sep 17 00:00:00 2001 From: Shehzaad Nakhoda Date: Tue, 23 Feb 2021 16:58:22 -0800 Subject: [PATCH 1/3] [BEAM-10961] enable strict dependency checking for sdks/java/io/elasticsearch --- sdks/java/io/elasticsearch/build.gradle | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sdks/java/io/elasticsearch/build.gradle b/sdks/java/io/elasticsearch/build.gradle index ac9e5e96cf02..d342eb9a8052 100644 --- a/sdks/java/io/elasticsearch/build.gradle +++ b/sdks/java/io/elasticsearch/build.gradle @@ -17,7 +17,7 @@ */ plugins { id 'org.apache.beam.module' } -applyJavaNature(automaticModuleName: 'org.apache.beam.sdk.io.elasticsearch') +applyJavaNature(enableStrictDependencies:true,automaticModuleName: 'org.apache.beam.sdk.io.elasticsearch') description = "Apache Beam :: SDKs :: Java :: IO :: Elasticsearch" ext.summary = "IO to read and write on Elasticsearch" @@ -25,8 +25,16 @@ ext.summary = "IO to read and write on Elasticsearch" dependencies { compile library.java.vendored_guava_26_0_jre compile project(path: ":sdks:java:core", configuration: "shadow") - compile library.java.jackson_databind compile library.java.jackson_annotations + permitUnusedDeclared library.java.jackson_annotations + compile library.java.jackson_core + compile library.java.jackson_databind + compile library.java.joda_time + compile "org.apache.httpcomponents:httpasyncclient:4.1.4" + compile "org.apache.httpcomponents:httpclient:4.5.10" + compile "org.apache.httpcomponents:httpcore-nio:4.4.12" + compile "org.apache.httpcomponents:httpcore:4.4.12" + compile library.java.slf4j_api compile "org.elasticsearch.client:elasticsearch-rest-client:7.9.2" testCompile project(path: ":sdks:java:io:common", configuration: "testRuntime") } From 37744041a940417ed33a8a8a574f52d9077cfc61 Mon Sep 17 00:00:00 2001 From: Shehzaad Nakhoda Date: Tue, 23 Feb 2021 23:07:12 -0800 Subject: [PATCH 2/3] [BEAM-10961] (1) nitpick: space (2) add reference to BEAM-11761 --- sdks/java/io/elasticsearch/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdks/java/io/elasticsearch/build.gradle b/sdks/java/io/elasticsearch/build.gradle index d342eb9a8052..9825a650c028 100644 --- a/sdks/java/io/elasticsearch/build.gradle +++ b/sdks/java/io/elasticsearch/build.gradle @@ -17,7 +17,7 @@ */ plugins { id 'org.apache.beam.module' } -applyJavaNature(enableStrictDependencies:true,automaticModuleName: 'org.apache.beam.sdk.io.elasticsearch') +applyJavaNature(enableStrictDependencies: true, automaticModuleName: 'org.apache.beam.sdk.io.elasticsearch') description = "Apache Beam :: SDKs :: Java :: IO :: Elasticsearch" ext.summary = "IO to read and write on Elasticsearch" @@ -26,7 +26,7 @@ dependencies { compile library.java.vendored_guava_26_0_jre compile project(path: ":sdks:java:core", configuration: "shadow") compile library.java.jackson_annotations - permitUnusedDeclared library.java.jackson_annotations + permitUnusedDeclared library.java.jackson_annotations // BEAM-11761 compile library.java.jackson_core compile library.java.jackson_databind compile library.java.joda_time From 33d71b396c1e3c4ba026f6efde1f0b724b332461 Mon Sep 17 00:00:00 2001 From: Shehzaad Nakhoda Date: Tue, 23 Feb 2021 23:13:01 -0800 Subject: [PATCH 3/3] [BEAM-10961] use library.java variables for httpcore and httpclient --- sdks/java/io/elasticsearch/build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdks/java/io/elasticsearch/build.gradle b/sdks/java/io/elasticsearch/build.gradle index 9825a650c028..8f58e31aee83 100644 --- a/sdks/java/io/elasticsearch/build.gradle +++ b/sdks/java/io/elasticsearch/build.gradle @@ -25,16 +25,16 @@ ext.summary = "IO to read and write on Elasticsearch" dependencies { compile library.java.vendored_guava_26_0_jre compile project(path: ":sdks:java:core", configuration: "shadow") + compile library.java.http_client + compile library.java.http_core compile library.java.jackson_annotations permitUnusedDeclared library.java.jackson_annotations // BEAM-11761 compile library.java.jackson_core compile library.java.jackson_databind compile library.java.joda_time + compile library.java.slf4j_api compile "org.apache.httpcomponents:httpasyncclient:4.1.4" - compile "org.apache.httpcomponents:httpclient:4.5.10" compile "org.apache.httpcomponents:httpcore-nio:4.4.12" - compile "org.apache.httpcomponents:httpcore:4.4.12" - compile library.java.slf4j_api compile "org.elasticsearch.client:elasticsearch-rest-client:7.9.2" testCompile project(path: ":sdks:java:io:common", configuration: "testRuntime") }