diff --git a/h2o-hadoop-2/assemblyjar.gradle b/h2o-hadoop-2/assemblyjar.gradle index d87a359b6ff9..c9afc98a7348 100644 --- a/h2o-hadoop-2/assemblyjar.gradle +++ b/h2o-hadoop-2/assemblyjar.gradle @@ -19,24 +19,19 @@ if (hasCustomHdfsDep) { } dependencies { - api("org.apache.hadoop:hadoop-client:$hadoopMavenArtifactVersion") { - force = true - } - api("org.apache.hadoop:hadoop-common:$hadoopMavenArtifactVersion") { - force = true - } + api("org.apache.hadoop:hadoop-client") + api("org.apache.hadoop:hadoop-common") + if (hasCustomHdfsDep) { - api("org.apache.hadoop:${hdfsDependency}:$hadoopMavenArtifactVersion") { - force = true - } + api("org.apache.hadoop:${hdfsDependency}") } + api(project(":h2o-mapreduce-generic")) { transitive = false } api project(":h2o-security") api project(":h2o-ext-steam") - // Libraries need for Google Cloud Storage strongly require this Guava version - api('com.google.guava:guava:20.0') {force = true} + api('com.google.guava:guava') api(project(':h2o-app')) { exclude module: "${defaultWebserverModule}" } @@ -78,6 +73,17 @@ dependencies { api(project(":h2o-parquet-parser")) { transitive = false } + + constraints { + api("org.apache.hadoop:hadoop-client:$hadoopMavenArtifactVersion") + api("org.apache.hadoop:hadoop-common:$hadoopMavenArtifactVersion") + if (hasCustomHdfsDep) { + api("org.apache.hadoop:${hdfsDependency}:$hadoopMavenArtifactVersion") + } + // Libraries needed for Google Cloud Storage strongly require this Guava version + api('com.google.guava:guava:20.0') + } + } apply from: "${rootDir}/h2o-parsers/h2o-parquet-parser/parquet_dependencies.gradle" diff --git a/h2o-hadoop-3/assemblyjar.gradle b/h2o-hadoop-3/assemblyjar.gradle index 56fa74c96463..ddf9f020b8be 100644 --- a/h2o-hadoop-3/assemblyjar.gradle +++ b/h2o-hadoop-3/assemblyjar.gradle @@ -16,10 +16,13 @@ dependencies { api "org.apache.hadoop:hadoop-mapreduce-client-app:$hadoopMavenArtifactVersion" api "org.apache.hadoop:hadoop-aws:$hadoopMavenArtifactVersion" // Libraries need for Google Cloud Storage strongly require this Guava version - api('com.google.guava:guava:20.0') { force = true } + api('com.google.guava:guava') api(project(':h2o-app')) { exclude module: "${defaultWebserverModule}" } + constraints { + api('com.google.guava:guava:20.0') + } } apply from: '../assemblyjar_common.gradle' diff --git a/h2o-hadoop-3/assemblyjar_cdp.gradle b/h2o-hadoop-3/assemblyjar_cdp.gradle index 0f5ca09780e8..41bd314a18be 100644 --- a/h2o-hadoop-3/assemblyjar_cdp.gradle +++ b/h2o-hadoop-3/assemblyjar_cdp.gradle @@ -22,7 +22,7 @@ dependencies { compileOnly "org.apache.hadoop:hadoop-client:$hadoopMavenArtifactVersion" compileOnly "org.apache.hadoop:hadoop-mapreduce-client-app:$hadoopMavenArtifactVersion" // Libraries need for Google Cloud Storage strongly require this Guava version - api('com.google.guava:guava:20.0') { force = true } + api('com.google.guava:guava') api(project(':h2o-app')) { exclude module: "${defaultWebserverModule}" exclude module: "h2o-ext-krbstandalone" // exclude here to avoid pulling all transitive dependencies @@ -30,6 +30,9 @@ dependencies { api(project(':h2o-ext-krbstandalone')) { // include without dependencies transitive = false } + constraints { + api('com.google.guava:guava:20.0') + } } apply from: '../assemblyjar_common.gradle'