[ 
https://issues.apache.org/jira/browse/BEAM-3496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16331557#comment-16331557
 ] 

ASF GitHub Bot commented on BEAM-3496:
--------------------------------------

chamikaramj closed pull request #4442: [BEAM-3496] Add missing dependencies in 
hadoopInputFormats build.gradle
URL: https://github.com/apache/beam/pull/4442
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/build.gradle b/build.gradle
index 6fb43700952..c5a077ee97e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -42,6 +42,7 @@ def spark_version = "2.2.1"
 def pubsub_grpc_version = "0.1.18"
 def apex_core_version = "3.6.0"
 def apex_malhar_version = "3.4.0"
+def postgres_version = "9.4.1212.jre7"
 
 // A map of maps containing common libraries used per language. To use:
 // dependencies {
@@ -131,6 +132,7 @@ ext.library = [
     netty_handler: "io.netty:netty-handler:$netty_version",
     netty_tcnative_boringssl_static: 
"io.netty:netty-tcnative-boringssl-static:1.1.33.Fork26",
     netty_transport_native_epoll: 
"io.netty:netty-transport-native-epoll:$netty_version",
+    postgres: "org.postgresql:postgresql:$postgres_version",
     protobuf_java: "com.google.protobuf:protobuf-java:$protobuf_version",
     protobuf_java_util: 
"com.google.protobuf:protobuf-java-util:$protobuf_version",
     proto_google_cloud_pubsub_v1: 
"com.google.api.grpc:proto-google-cloud-pubsub-v1:$pubsub_grpc_version",
diff --git a/sdks/java/io/common/build.gradle b/sdks/java/io/common/build.gradle
index 54168f258ba..d92d09d3e62 100644
--- a/sdks/java/io/common/build.gradle
+++ b/sdks/java/io/common/build.gradle
@@ -25,6 +25,7 @@ dependencies {
   compile library.java.guava
   shadow project(path: ":sdks:java:core", configuration: "shadow")
   testCompile library.java.junit
+  testCompile library.java.postgres
 }
 
 task packageTests(type: Jar) {
diff --git a/sdks/java/io/hadoop/input-format/build.gradle 
b/sdks/java/io/hadoop/input-format/build.gradle
index 6d8cb4756e9..a931d26e60c 100644
--- a/sdks/java/io/hadoop/input-format/build.gradle
+++ b/sdks/java/io/hadoop/input-format/build.gradle
@@ -23,6 +23,15 @@ description = "Apache Beam :: SDKs :: Java :: IO :: Hadoop 
:: input-format"
 
 def log4j_version = "2.6.2"
 
+/*
+ * We need to rely on manually specifying these evaluationDependsOn to ensure 
that
+ * the following projects are evaluated before we evaluate this project. This 
is because
+ * we are attempting to reference the "sourceSets.test.output" directly.
+ * TODO: Swap to generating test artifacts which we can then rely on instead of
+ * the test outputs directly.
+ */
+evaluationDependsOn(":sdks:java:io:common")
+
 dependencies {
   compile library.java.guava
   shadow project(path: ":sdks:java:core", configuration: "shadow")
@@ -33,10 +42,14 @@ dependencies {
   provided library.java.hadoop_mapreduce_client_core
   testCompile library.java.hamcrest_core
   testCompile project(path: ":sdks:java:core", configuration: "shadowTest")
+  testCompile project(path: ":sdks:java:io:common", configuration: "shadow")
+  testCompile project(":sdks:java:io:common").sourceSets.test.output
+  testCompile project(path: ":sdks:java:io:jdbc", configuration: "shadow")
   testCompile project(path: ":runners:direct-java", configuration: "shadow")
   testCompile "org.apache.logging.log4j:log4j-core:$log4j_version"
   testCompile library.java.junit
   testCompile library.java.mockito_core
+  testCompile library.java.postgres
 }
 
 task packageTests(type: Jar) {
diff --git a/sdks/java/io/jdbc/build.gradle b/sdks/java/io/jdbc/build.gradle
index 1e7d4dccc4c..ab488c91f4d 100644
--- a/sdks/java/io/jdbc/build.gradle
+++ b/sdks/java/io/jdbc/build.gradle
@@ -42,10 +42,10 @@ dependencies {
   testCompile library.java.hamcrest_core
   testCompile library.java.slf4j_api
   testCompile library.java.slf4j_jdk14
+  testCompile library.java.postgres
   testCompile group: "org.apache.derby", name: "derby", version:"10.12.1.1"
   testCompile group: "org.apache.derby", name: "derbyclient", 
version:"10.12.1.1"
   testCompile group: "org.apache.derby", name: "derbynet", version:"10.12.1.1"
-  testCompile group: "org.postgresql", name: "postgresql", 
version:"9.4.1212.jre7"
 }
 
 task packageTests(type: Jar) {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Gradle build broken because of missing dependency in 
> sdks/java/io/hadoop/input-format
> -------------------------------------------------------------------------------------
>
>                 Key: BEAM-3496
>                 URL: https://issues.apache.org/jira/browse/BEAM-3496
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-extensions
>            Reporter: Luke Cwik
>            Assignee: Ɓukasz Gajowy
>            Priority: Critical
>             Fix For: 2.3.0
>
>
> /home/jenkins/jenkins-slave/workspace/beam_PreCommit_Java_GradleBuild/src/sdks/java/io/hadoop/input-format/src/test/java/org/apache/beam/sdk/io/hadoop/inputformat/HadoopInputFormatIOIT.java:20:
>  error: package org.apache.beam.sdk.io.common does not exist
> import static 
> org.apache.beam.sdk.io.common.TestRow.DeterministicallyConstructTestRowFn;
>                                            ^
> /home/jenkins/jenkins-slave/workspace/beam_PreCommit_Java_GradleBuild/src/sdks/java/io/hadoop/input-format/src/test/java/org/apache/beam/sdk/io/hadoop/inputformat/HadoopInputFormatIOIT.java:20:
>  error: static import only from classes and interfaces
> import static 
> org.apache.beam.sdk.io.common.TestRow.DeterministicallyConstructTestRowFn;
> ^



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to