diff --git a/sdks/java/io/azure/build.gradle b/sdks/java/io/azure/build.gradle index 97d31f9d9640..8c5658abee54 100644 --- a/sdks/java/io/azure/build.gradle +++ b/sdks/java/io/azure/build.gradle @@ -21,6 +21,7 @@ plugins { } applyJavaNature( + enableStrictDependencies:true, automaticModuleName: 'org.apache.beam.sdk.io.azure') description = "Apache Beam :: SDKs :: Java :: IO :: Azure" @@ -29,13 +30,19 @@ ext.summary = "IO library to read and write Azure services from Beam." repositories { jcenter() } dependencies { + compile library.java.commons_io + permitUnusedDeclared library.java.commons_io + compile library.java.slf4j_api compile library.java.vendored_guava_26_0_jre compile project(path: ":sdks:java:core", configuration: "shadow") compile "com.azure:azure-storage-blob:12.8.0" compile "com.azure:azure-identity:1.0.8" compile "com.microsoft.azure:azure-storage:8.6.5" - compile "commons-io:commons-io:2.6" - compile library.java.slf4j_api + compile "com.azure:azure-core:1.6.0" + compile "com.azure:azure-storage-common:12.1.0" + compile library.java.jackson_annotations + compile library.java.jackson_core + compile library.java.jackson_databind testCompile project(path: ":sdks:java:core", configuration: "shadowTest") testCompile library.java.mockito_core testCompile library.java.junit diff --git a/sdks/java/io/bigquery-io-perf-tests/build.gradle b/sdks/java/io/bigquery-io-perf-tests/build.gradle index 8d5cf89195d3..61950b92ec27 100644 --- a/sdks/java/io/bigquery-io-perf-tests/build.gradle +++ b/sdks/java/io/bigquery-io-perf-tests/build.gradle @@ -17,7 +17,7 @@ */ plugins { id 'org.apache.beam.module' } -applyJavaNature(exportJavadoc: false, publish: false) +applyJavaNature(enableStrictDependencies:true,exportJavadoc: false, publish: false) provideIntegrationTestingDependencies() enableJavaPerformanceTesting() @@ -25,7 +25,7 @@ description = "Apache Beam :: SDKs :: Java :: Google BigQuery IO Performance tes ext.summary = "Performance tests for Google BigQuery IO sources and sinks" dependencies { - compile library.java.google_api_services_bigquery + testImplementation library.java.google_api_services_bigquery testCompile project(path: ":sdks:java:core", configuration: "shadowTest") testCompile project(path: ":sdks:java:testing:test-utils", configuration: "testRuntime") testCompile project(path: ":sdks:java:extensions:google-cloud-platform-core", configuration: "testRuntime") @@ -34,7 +34,4 @@ dependencies { testCompile project(path: ":sdks:java:io:google-cloud-platform", configuration: "testRuntime") testCompile project(":sdks:java:io:synthetic") testCompile library.java.junit - testCompile library.java.hamcrest_core - testCompile library.java.jaxb_api - testCompile library.java.jaxb_impl } diff --git a/sdks/java/io/clickhouse/build.gradle b/sdks/java/io/clickhouse/build.gradle index 42deda7c14ab..9dc4bb4edae6 100644 --- a/sdks/java/io/clickhouse/build.gradle +++ b/sdks/java/io/clickhouse/build.gradle @@ -21,6 +21,7 @@ plugins { id 'ca.coglinc.javacc' } applyJavaNature( + enableStrictDependencies:true, automaticModuleName: 'org.apache.beam.sdk.io.clickhouse', generatedClassPatterns: [ /^org\.apache\.beam\.sdk\.io\.clickhouse\.impl\.parser\..*/, @@ -54,7 +55,10 @@ def clickhouse_jdbc_version = "0.2.4" dependencies { javacc "net.java.dev.javacc:javacc:7.0.9" compile project(path: ":sdks:java:core", configuration: "shadow") + compile library.java.guava compile library.java.joda_time + compile library.java.slf4j_api + compile library.java.vendored_guava_26_0_jre compile "ru.yandex.clickhouse:clickhouse-jdbc:$clickhouse_jdbc_version" testCompile library.java.slf4j_api testCompile library.java.junit diff --git a/sdks/java/io/contextualtextio/build.gradle b/sdks/java/io/contextualtextio/build.gradle index 0ebd983eeb60..fe2fb7297a60 100644 --- a/sdks/java/io/contextualtextio/build.gradle +++ b/sdks/java/io/contextualtextio/build.gradle @@ -18,6 +18,7 @@ plugins { id 'org.apache.beam.module' } applyJavaNature( + enableStrictDependencies:true, automaticModuleName: 'org.apache.beam.sdk.io.contextualtextio', ) @@ -25,11 +26,14 @@ description = "Apache Beam :: SDKs :: Java :: Contextual-Text-IO" ext.summary = "Context-aware Text IO." dependencies { - compile library.java.vendored_guava_26_0_jre - compile library.java.protobuf_java compile project(path: ":sdks:java:core", configuration: "shadow") - testCompile project(path: ":sdks:java:core", configuration: "shadowTest") + compile library.java.protobuf_java + permitUnusedDeclared library.java.protobuf_java + compile library.java.slf4j_api + compile library.java.vendored_guava_26_0_jre + compile library.java.vendored_grpc_1_26_0 + testCompile project(path: ":sdks:java:core", configuration: "shadowTest") testCompile library.java.guava_testlib testCompile library.java.junit testCompile library.java.hamcrest_core 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") } diff --git a/sdks/java/io/expansion-service/build.gradle b/sdks/java/io/expansion-service/build.gradle index 75ff5ad05544..6665e4fac6e2 100644 --- a/sdks/java/io/expansion-service/build.gradle +++ b/sdks/java/io/expansion-service/build.gradle @@ -21,6 +21,7 @@ apply plugin: 'application' mainClassName = "org.apache.beam.sdk.expansion.service.ExpansionService" applyJavaNature( + enableStrictDependencies:true, automaticModuleName: 'org.apache.beam.sdk.io.expansion.service', exportJavadoc: false, validateShadowJar: false, @@ -32,10 +33,14 @@ ext.summary = "Expansion service serving several Java IOs" dependencies { compile project(":sdks:java:expansion-service") + permitUnusedDeclared project(":sdks:java:expansion-service") compile project(":sdks:java:io:kafka") + permitUnusedDeclared project(":sdks:java:io:kafka") compile project(":sdks:java:io:jdbc") + permitUnusedDeclared project(":sdks:java:io:jdbc") // Include postgres so it can be used with external JDBC compile library.java.postgres + permitUnusedDeclared library.java.postgres runtime library.java.kafka_clients runtime library.java.slf4j_jdk14 } diff --git a/sdks/java/io/file-based-io-tests/build.gradle b/sdks/java/io/file-based-io-tests/build.gradle index 6c53e90ff17f..ec96b3e4a051 100644 --- a/sdks/java/io/file-based-io-tests/build.gradle +++ b/sdks/java/io/file-based-io-tests/build.gradle @@ -17,7 +17,7 @@ */ plugins { id 'org.apache.beam.module' } -applyJavaNature(exportJavadoc: false, publish: false) +applyJavaNature(enableStrictDependencies:true,exportJavadoc: false, publish: false) provideIntegrationTestingDependencies() enableJavaPerformanceTesting() @@ -31,8 +31,6 @@ dependencies { testCompile project(path: ":sdks:java:io:parquet", configuration: "testRuntime") testCompile project(path: ":sdks:java:testing:test-utils", configuration: "testRuntime") testCompile library.java.jaxb_api - testCompile library.java.jaxb_impl testCompile library.java.junit - testCompile library.java.hamcrest_core testCompile library.java.hadoop_client } diff --git a/sdks/java/io/hcatalog/build.gradle b/sdks/java/io/hcatalog/build.gradle index d1c9e6fa9831..eb43a5ee1d2a 100644 --- a/sdks/java/io/hcatalog/build.gradle +++ b/sdks/java/io/hcatalog/build.gradle @@ -19,7 +19,7 @@ import java.util.stream.Collectors plugins { id 'org.apache.beam.module' } -applyJavaNature(automaticModuleName: 'org.apache.beam.sdk.io.hcatalog') +applyJavaNature(enableStrictDependencies:true,automaticModuleName: 'org.apache.beam.sdk.io.hcatalog') description = "Apache Beam :: SDKs :: Java :: IO :: HCatalog" ext.summary = "IO to read and write for HCatalog source." @@ -55,6 +55,7 @@ dependencies { compile project(path: ":sdks:java:core", configuration: "shadow") compile project(":sdks:java:io:hadoop-common") compile library.java.slf4j_api + compile library.java.joda_time // Hive bundles without repackaging Jackson which is why we redeclare it here so that it appears // on the compile/test/runtime classpath before Hive. provided library.java.jackson_annotations @@ -65,8 +66,6 @@ dependencies { provided library.java.hadoop_common provided "org.apache.hive:hive-exec:$hive_version" provided(group: "org.apache.hive.hcatalog", name: "hive-hcatalog-core", version: hive_version) { - exclude group: "org.apache.hive", module: "hive-exec" - exclude group: "com.google.protobuf", module: "protobuf-java" } testCompile project(":sdks:java:io:common").sourceSets.test.output testCompile library.java.commons_io diff --git a/sdks/java/io/influxdb/build.gradle b/sdks/java/io/influxdb/build.gradle index 782c57218eae..ca9371fe5945 100644 --- a/sdks/java/io/influxdb/build.gradle +++ b/sdks/java/io/influxdb/build.gradle @@ -17,7 +17,7 @@ */ plugins { id 'org.apache.beam.module' } -applyJavaNature(automaticModuleName: 'org.apache.beam.sdk.io.influxdb') +applyJavaNature(enableStrictDependencies:true,automaticModuleName: 'org.apache.beam.sdk.io.influxdb') provideIntegrationTestingDependencies() enableJavaPerformanceTesting() @@ -27,6 +27,9 @@ ext.summary = "IO to read and write on InfluxDB" dependencies { compile project(path: ":sdks:java:core", configuration: "shadow") compile library.java.influxdb_library + compile "com.squareup.okhttp3:okhttp:4.6.0" + compile library.java.vendored_guava_26_0_jre + compile library.java.slf4j_api testCompile library.java.junit testCompile library.java.powermock testCompile library.java.powermock_mockito diff --git a/sdks/java/io/jdbc/build.gradle b/sdks/java/io/jdbc/build.gradle index 549749c1d830..124d16d7a296 100644 --- a/sdks/java/io/jdbc/build.gradle +++ b/sdks/java/io/jdbc/build.gradle @@ -18,6 +18,7 @@ plugins { id 'org.apache.beam.module' } applyJavaNature( + enableStrictDependencies:true, automaticModuleName: 'org.apache.beam.sdk.io.jdbc', ) provideIntegrationTestingDependencies() @@ -30,17 +31,18 @@ dependencies { compile library.java.vendored_guava_26_0_jre compile project(path: ":sdks:java:core", configuration: "shadow") compile "org.apache.commons:commons-dbcp2:2.6.0" + compile library.java.joda_time + compile "org.apache.commons:commons-pool2:2.6.1" + compile library.java.slf4j_api + testCompile "org.apache.derby:derby:10.14.2.0" + testCompile "org.apache.derby:derbyclient:10.14.2.0" + testCompile "org.apache.derby:derbynet:10.14.2.0" testCompile project(path: ":sdks:java:core", configuration: "shadowTest") testCompile project(path: ":sdks:java:io:common", configuration: "testRuntime") testCompile project(path: ":sdks:java:testing:test-utils", configuration: "testRuntime") testCompile library.java.junit - testCompile library.java.hamcrest_core - testCompile library.java.hamcrest_library testCompile library.java.slf4j_api testCompile library.java.postgres - testCompile "org.apache.derby:derby:10.14.2.0" - testCompile "org.apache.derby:derbyclient:10.14.2.0" - testCompile "org.apache.derby:derbynet:10.14.2.0" testRuntimeOnly library.java.slf4j_jdk14 testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow") } diff --git a/sdks/java/io/jms/build.gradle b/sdks/java/io/jms/build.gradle index 657bed432fae..45a9336aa03e 100644 --- a/sdks/java/io/jms/build.gradle +++ b/sdks/java/io/jms/build.gradle @@ -18,6 +18,7 @@ plugins { id 'org.apache.beam.module' } applyJavaNature( + enableStrictDependencies:true, automaticModuleName: 'org.apache.beam.sdk.io.jms', ) @@ -30,14 +31,12 @@ dependencies { compile project(path: ":sdks:java:core", configuration: "shadow") compile library.java.slf4j_api compile library.java.joda_time - compile "org.apache.geronimo.specs:geronimo-jms_1.1_spec:1.1.1" - testCompile library.java.activemq_broker testCompile library.java.activemq_jaas testCompile library.java.activemq_kahadb_store + compile "org.apache.geronimo.specs:geronimo-jms_1.1_spec:1.1.1" + testCompile library.java.activemq_broker testCompile library.java.activemq_client testCompile library.java.junit - testCompile library.java.hamcrest_core - testCompile library.java.hamcrest_library testRuntimeOnly library.java.slf4j_jdk14 testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow") } diff --git a/sdks/java/io/kafka/build.gradle b/sdks/java/io/kafka/build.gradle index a500ddd49fb5..4d98135f397a 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,9 @@ 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") + compile "org.apache.kafka:kafka-clients:2.4.1" + compile library.java.avro // Get back to "provided" since 2.14 provided library.java.kafka_clients compile library.java.slf4j_api @@ -57,6 +61,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 +82,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 diff --git a/sdks/java/io/kinesis/build.gradle b/sdks/java/io/kinesis/build.gradle index bb513d875c6f..0a7256206bae 100644 --- a/sdks/java/io/kinesis/build.gradle +++ b/sdks/java/io/kinesis/build.gradle @@ -17,7 +17,7 @@ */ plugins { id 'org.apache.beam.module' } -applyJavaNature(automaticModuleName: 'org.apache.beam.sdk.io.kinesis') +applyJavaNature(enableStrictDependencies:true,automaticModuleName: 'org.apache.beam.sdk.io.kinesis') provideIntegrationTestingDependencies() enableJavaPerformanceTesting() @@ -31,22 +31,21 @@ test { dependencies { compile project(path: ":sdks:java:core", configuration: "shadow") - compile library.java.slf4j_api - compile library.java.joda_time - compile library.java.jackson_dataformat_cbor - compile library.java.guava compile library.java.aws_java_sdk_cloudwatch compile library.java.aws_java_sdk_core compile library.java.aws_java_sdk_kinesis + compile library.java.commons_lang3 + compile library.java.guava + compile library.java.joda_time + compile library.java.slf4j_api compile "com.amazonaws:amazon-kinesis-client:1.13.0" compile "com.amazonaws:amazon-kinesis-producer:0.14.1" compile "commons-lang:commons-lang:2.6" + compile library.java.vendored_guava_26_0_jre testCompile project(path: ":sdks:java:io:common", configuration: "testRuntime") testCompile library.java.junit testCompile library.java.mockito_core testCompile library.java.guava_testlib - testCompile library.java.hamcrest_core - testCompile library.java.hamcrest_library testCompile library.java.powermock testCompile library.java.powermock_mockito testCompile library.java.testcontainers_localstack diff --git a/sdks/java/io/kinesis/expansion-service/build.gradle b/sdks/java/io/kinesis/expansion-service/build.gradle index ef3db42f0e2d..e21f9f061d13 100644 --- a/sdks/java/io/kinesis/expansion-service/build.gradle +++ b/sdks/java/io/kinesis/expansion-service/build.gradle @@ -21,7 +21,7 @@ apply plugin: 'application' mainClassName = "org.apache.beam.sdk.expansion.service.ExpansionService" applyJavaNature( - + enableStrictDependencies:true, automaticModuleName: 'org.apache.beam.sdk.io.kinesis.expansion.service', exportJavadoc: false, validateShadowJar: false, @@ -33,6 +33,8 @@ ext.summary = "Expansion service serving KinesisIO" dependencies { compile project(":sdks:java:expansion-service") + permitUnusedDeclared project(":sdks:java:expansion-service") compile project(":sdks:java:io:kinesis") + permitUnusedDeclared project(":sdks:java:io:kinesis") runtime library.java.slf4j_jdk14 } diff --git a/sdks/java/io/mqtt/build.gradle b/sdks/java/io/mqtt/build.gradle index a384274de773..0b59ea191ad3 100644 --- a/sdks/java/io/mqtt/build.gradle +++ b/sdks/java/io/mqtt/build.gradle @@ -17,7 +17,7 @@ */ plugins { id 'org.apache.beam.module' } -applyJavaNature(automaticModuleName: 'org.apache.beam.sdk.io.mqtt') +applyJavaNature(enableStrictDependencies:true,automaticModuleName: 'org.apache.beam.sdk.io.mqtt') description = "Apache Beam :: SDKs :: Java :: IO :: MQTT" ext.summary = "IO to read and write to a MQTT broker." @@ -27,15 +27,13 @@ dependencies { compile project(path: ":sdks:java:core", configuration: "shadow") compile library.java.slf4j_api compile library.java.joda_time + testCompile library.java.activemq_mqtt + testCompile library.java.activemq_kahadb_store compile "org.fusesource.mqtt-client:mqtt-client:1.15" compile "org.fusesource.hawtbuf:hawtbuf:1.11" testCompile project(path: ":sdks:java:io:common", configuration: "testRuntime") testCompile library.java.activemq_broker - testCompile library.java.activemq_mqtt - testCompile library.java.activemq_kahadb_store testCompile library.java.junit - testCompile library.java.hamcrest_core - testCompile library.java.hamcrest_library testRuntimeOnly library.java.slf4j_jdk14 testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow") } diff --git a/sdks/java/io/parquet/build.gradle b/sdks/java/io/parquet/build.gradle index bdf1628efec8..88295d3283cb 100644 --- a/sdks/java/io/parquet/build.gradle +++ b/sdks/java/io/parquet/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.parquet', ) @@ -46,11 +47,10 @@ dependencies { compile "org.apache.parquet:parquet-common:$parquet_version" compile "org.apache.parquet:parquet-hadoop:$parquet_version" compile library.java.avro + compile "org.apache.parquet:parquet-column:1.10.0" provided library.java.hadoop_client testCompile project(path: ":sdks:java:core", configuration: "shadowTest") testCompile library.java.junit - testCompile library.java.hamcrest_core - testCompile library.java.hamcrest_library testRuntimeOnly library.java.slf4j_jdk14 testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow") hadoopVersions.each {kv -> diff --git a/sdks/java/io/solr/build.gradle b/sdks/java/io/solr/build.gradle index 33a9b5cb69c7..9c49d1fdc667 100644 --- a/sdks/java/io/solr/build.gradle +++ b/sdks/java/io/solr/build.gradle @@ -18,6 +18,7 @@ plugins { id 'org.apache.beam.module' } applyJavaNature( + enableStrictDependencies:true, automaticModuleName: 'org.apache.beam.sdk.io.solr', ) @@ -30,12 +31,11 @@ dependencies { compile library.java.vendored_guava_26_0_jre compile project(path: ":sdks:java:core", configuration: "shadow") compile library.java.commons_compress + compile library.java.joda_time + compile library.java.slf4j_api compile "org.apache.solr:solr-solrj:$solrVersion" - compileOnly "org.apache.httpcomponents:httpclient:4.5.6" testCompile project(path: ":sdks:java:core", configuration: "shadowTest") testCompile project(":sdks:java:io:common") - testCompile library.java.hamcrest_core - testCompile library.java.hamcrest_library testCompile library.java.junit testCompile library.java.slf4j_api testCompile "org.apache.solr:solr-test-framework:$solrVersion" diff --git a/sdks/java/io/splunk/build.gradle b/sdks/java/io/splunk/build.gradle index a8a31b7354d6..4519f18c8de9 100644 --- a/sdks/java/io/splunk/build.gradle +++ b/sdks/java/io/splunk/build.gradle @@ -19,7 +19,7 @@ plugins { id 'org.apache.beam.module' } -applyJavaNature(automaticModuleName: 'org.apache.beam.sdk.io.splunk') +applyJavaNature(enableStrictDependencies:true,automaticModuleName: 'org.apache.beam.sdk.io.splunk') description = "Apache Beam :: SDKs :: Java :: IO :: Splunk" ext.summary = "IO to write events to Splunk Http Event Collector (HEC)" @@ -28,9 +28,15 @@ dependencies { compile platform(library.java.google_cloud_platform_libraries_bom) compile library.java.slf4j_api compile library.java.google_api_client + permitUnusedDeclared library.java.google_api_client compile library.java.google_http_client_apache_v2 compile library.java.google_code_gson compile project(path: ":sdks:java:core", configuration: "shadow") + compile "com.google.http-client:google-http-client:1.34.0" + compile library.java.joda_time + compile library.java.vendored_guava_26_0_jre + compile "org.apache.httpcomponents:httpclient:4.5.10" + compile "org.apache.httpcomponents:httpcore:4.4.12" testCompile library.java.junit testCompile group: 'org.mock-server', name: 'mockserver-junit-rule', version: '5.10.0' testCompile group: 'org.mock-server', name: 'mockserver-client-java', version: '5.10.0' diff --git a/sdks/java/io/synthetic/build.gradle b/sdks/java/io/synthetic/build.gradle index cb9cbf8db1d7..ab76b60fa502 100644 --- a/sdks/java/io/synthetic/build.gradle +++ b/sdks/java/io/synthetic/build.gradle @@ -18,6 +18,7 @@ plugins { id 'org.apache.beam.module' } applyJavaNature( + enableStrictDependencies:true, exportJavadoc: false, automaticModuleName: 'org.apache.beam.sdk.io.synthetic', ) @@ -31,11 +32,11 @@ dependencies { compile library.java.jackson_core compile library.java.jackson_annotations compile library.java.jackson_databind + compile library.java.vendored_guava_26_0_jre + compile library.java.slf4j_api compile project(path: ":sdks:java:core", configuration: "shadow") testCompile library.java.vendored_guava_26_0_jre testCompile library.java.junit - testCompile library.java.hamcrest_core - testCompile library.java.hamcrest_library testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow") } diff --git a/sdks/java/io/thrift/build.gradle b/sdks/java/io/thrift/build.gradle index d22b934256e7..21e5b28c4cde 100644 --- a/sdks/java/io/thrift/build.gradle +++ b/sdks/java/io/thrift/build.gradle @@ -21,6 +21,7 @@ plugins { // id "org.jruyi.thrift" version "0.4.1" } applyJavaNature( + enableStrictDependencies:true, automaticModuleName: 'org.apache.beam.sdk.io.thrift', generatedClassPatterns: [ /^org\.apache\.beam\.sdk\.io\.thrift\.TestThriftStruct/, @@ -39,11 +40,6 @@ dependencies { compile "org.apache.thrift:libthrift:0.13.0" compile project(path: ":sdks:java:core", configuration: "shadow") testCompile library.java.junit - testCompile library.java.hamcrest_core - testCompile library.java.hamcrest_library - testCompile library.java.jackson_databind - testCompile "com.google.code.gson:gson:2.8.6" - testCompile "commons-io:commons-io:2.6" testRuntimeOnly library.java.slf4j_jdk14 testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow") } diff --git a/sdks/java/io/tika/build.gradle b/sdks/java/io/tika/build.gradle index 28c6c622a31f..931261ad74ff 100644 --- a/sdks/java/io/tika/build.gradle +++ b/sdks/java/io/tika/build.gradle @@ -17,7 +17,7 @@ */ plugins { id 'org.apache.beam.module' } -applyJavaNature(automaticModuleName: 'org.apache.beam.sdk.io.tika') +applyJavaNature(enableStrictDependencies:true,automaticModuleName: 'org.apache.beam.sdk.io.tika') description = "Apache Beam :: SDKs :: Java :: IO :: Tika" ext.summary = "Tika Input to parse files." @@ -27,14 +27,11 @@ def bndlib_version = "1.43.0" dependencies { compile library.java.vendored_guava_26_0_jre - compileOnly "biz.aQute:bndlib:$bndlib_version" compile project(path: ":sdks:java:core", configuration: "shadow") compile "org.apache.tika:tika-core:$tika_version" + testCompile "org.apache.tika:tika-parsers:$tika_version" testCompile project(path: ":sdks:java:core", configuration: "shadowTest") testCompile library.java.junit - testCompile library.java.hamcrest_core - testCompile library.java.hamcrest_library - testCompile "org.apache.tika:tika-parsers:$tika_version" testCompileOnly "biz.aQute:bndlib:$bndlib_version" testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow") } diff --git a/sdks/java/io/xml/build.gradle b/sdks/java/io/xml/build.gradle index d6c8ba2761e3..91e40bf88752 100644 --- a/sdks/java/io/xml/build.gradle +++ b/sdks/java/io/xml/build.gradle @@ -17,22 +17,21 @@ */ plugins { id 'org.apache.beam.module' } -applyJavaNature(automaticModuleName: 'org.apache.beam.sdk.io.xml') +applyJavaNature(enableStrictDependencies:true,automaticModuleName: 'org.apache.beam.sdk.io.xml') description = "Apache Beam :: SDKs :: Java :: IO :: XML" ext.summary = "IO to read and write XML files." dependencies { compile library.java.jaxb_api - compile library.java.jaxb_impl compile library.java.vendored_guava_26_0_jre compile project(path: ":sdks:java:core", configuration: "shadow") compile library.java.stax2_api + compile "javax.xml.stream:stax-api:1.0-2" compile library.java.woodstox_core_asl + permitUnusedDeclared library.java.woodstox_core_asl testCompile project(path: ":sdks:java:core", configuration: "shadowTest") testCompile library.java.junit - testCompile library.java.hamcrest_core - testCompile library.java.hamcrest_library testRuntimeOnly library.java.slf4j_jdk14 testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow") }