From 353fab2440dbf1369df20393e0377de2b327de72 Mon Sep 17 00:00:00 2001 From: Jey Kottalam Date: Thu, 15 Aug 2013 12:10:31 -0700 Subject: [PATCH] Initial changes to make Maven build agnostic of hadoop version --- assembly/pom.xml | 8 +-- bagel/pom.xml | 43 ++++---------- core/pom.xml | 63 ++------------------ examples/pom.xml | 144 +++++++++++++++++++--------------------------- mllib/pom.xml | 43 ++++---------- pom.xml | 32 ++++------- repl-bin/pom.xml | 76 ++++++++++-------------- repl/pom.xml | 72 +++++++---------------- streaming/pom.xml | 42 ++++---------- tools/pom.xml | 53 +++++------------ 10 files changed, 175 insertions(+), 401 deletions(-) diff --git a/assembly/pom.xml b/assembly/pom.xml index cc5a4875af868..76ac9f547809f 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -38,12 +38,6 @@ - - hadoop1 - - hadoop1 - - hadoop2 @@ -89,4 +83,4 @@ ${project.version} - \ No newline at end of file + diff --git a/bagel/pom.xml b/bagel/pom.xml index 60bbc49e6c5c1..3c82af3b335f3 100644 --- a/bagel/pom.xml +++ b/bagel/pom.xml @@ -32,11 +32,20 @@ http://spark-project.org/ + + org.spark-project + spark-core + ${project.version} + + + org.apache.hadoop + hadoop-client + provided + org.eclipse.jetty jetty-server - org.scalatest scalatest_${scala.version} @@ -60,33 +69,6 @@ - - hadoop1 - - - org.spark-project - spark-core - ${project.version} - hadoop1 - - - org.apache.hadoop - hadoop-core - provided - - - - - - org.apache.maven.plugins - maven-jar-plugin - - hadoop1 - - - - - hadoop2 @@ -96,11 +78,6 @@ ${project.version} hadoop2 - - org.apache.hadoop - hadoop-core - provided - org.apache.hadoop hadoop-client diff --git a/core/pom.xml b/core/pom.xml index dfadd22d4214b..680ae94a11596 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -32,6 +32,11 @@ http://spark-project.org/ + + org.apache.hadoop + hadoop-client + provided + org.eclipse.jetty jetty-server @@ -130,7 +135,6 @@ com.codahale.metrics metrics-json - org.apache.derby derby @@ -210,66 +214,9 @@ - - hadoop1 - - - org.apache.hadoop - hadoop-core - provided - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - src/main/scala - src/hadoop1/scala - - - - - add-scala-test-sources - generate-test-sources - - add-test-source - - - - src/test/scala - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - hadoop1 - - - - - hadoop2 - - org.apache.hadoop - hadoop-core - provided - org.apache.hadoop hadoop-client diff --git a/examples/pom.xml b/examples/pom.xml index a051da8a778a2..6a9c19ed6f4a1 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -32,6 +32,31 @@ http://spark-project.org/ + + org.spark-project + spark-core + ${project.version} + + + org.spark-project + spark-streaming + ${project.version} + + + org.spark-project + spark-mllib + ${project.version} + + + org.apache.hadoop + hadoop-client + provided + + + org.apache.hbase + hbase + 0.94.6 + org.scala-lang scala-library @@ -55,41 +80,41 @@ scalacheck_${scala.version} test - - org.apache.cassandra - cassandra-all - 1.2.5 - - - com.google.guava - guava - - - com.googlecode.concurrentlinkedhashmap - concurrentlinkedhashmap-lru - - - com.ning - compress-lzf - - - io.netty - netty - - - jline - jline - - - log4j - log4j - - - org.apache.cassandra.deps - avro - - - + + org.apache.cassandra + cassandra-all + 1.2.5 + + + com.google.guava + guava + + + com.googlecode.concurrentlinkedhashmap + concurrentlinkedhashmap-lru + + + com.ning + compress-lzf + + + io.netty + netty + + + jline + jline + + + log4j + log4j + + + org.apache.cassandra.deps + avro + + + target/scala-${scala.version}/classes @@ -103,50 +128,6 @@ - - hadoop1 - - - org.spark-project - spark-core - ${project.version} - hadoop1 - - - org.spark-project - spark-streaming - ${project.version} - hadoop1 - - - org.spark-project - spark-mllib - ${project.version} - hadoop1 - - - org.apache.hadoop - hadoop-core - provided - - - org.apache.hbase - hbase - 0.94.6 - - - - - - org.apache.maven.plugins - maven-jar-plugin - - hadoop1 - - - - - hadoop2 @@ -168,11 +149,6 @@ ${project.version} hadoop2 - - org.apache.hadoop - hadoop-core - provided - org.apache.hadoop hadoop-client diff --git a/mllib/pom.xml b/mllib/pom.xml index a07480fbe2b5b..36f410d3b02cb 100644 --- a/mllib/pom.xml +++ b/mllib/pom.xml @@ -32,6 +32,16 @@ http://spark-project.org/ + + org.spark-project + spark-core + ${project.version} + + + org.apache.hadoop + hadoop-client + provided + org.eclipse.jetty jetty-server @@ -41,7 +51,6 @@ jblas 1.2.3 - org.scalatest scalatest_${scala.version} @@ -70,33 +79,6 @@ - - hadoop1 - - - org.spark-project - spark-core - ${project.version} - hadoop1 - - - org.apache.hadoop - hadoop-core - provided - - - - - - org.apache.maven.plugins - maven-jar-plugin - - hadoop1 - - - - - hadoop2 @@ -106,11 +88,6 @@ ${project.version} hadoop2 - - org.apache.hadoop - hadoop-core - provided - org.apache.hadoop hadoop-client diff --git a/pom.xml b/pom.xml index 135b18bd26794..8d34fff3eeb9a 100644 --- a/pom.xml +++ b/pom.xml @@ -325,6 +325,17 @@ 0.8 test + + org.apache.hadoop + hadoop-client + 1.2.1 + + + asm + asm + + + @@ -530,22 +541,6 @@ - - hadoop1 - - 1 - - - - - org.apache.hadoop - hadoop-core - 1.2.1 - - - - - hadoop2 @@ -553,11 +548,6 @@ - - org.apache.hadoop - hadoop-core - 2.0.0-mr1-cdh${cdh.version} - org.apache.hadoop hadoop-client diff --git a/repl-bin/pom.xml b/repl-bin/pom.xml index 7c4e722cc157e..81aba06e145a7 100644 --- a/repl-bin/pom.xml +++ b/repl-bin/pom.xml @@ -37,6 +37,37 @@ root + + + org.spark-project + spark-core + ${project.version} + + + org.spark-project + spark-bagel + ${project.version} + runtime + + + org.spark-project + spark-examples + ${project.version} + runtime + + + org.spark-project + spark-repl + ${project.version} + runtime + + + org.apache.hadoop + hadoop-client + runtime + + + @@ -85,46 +116,6 @@ - - hadoop1 - - hadoop1 - - - - org.spark-project - spark-core - ${project.version} - hadoop1 - - - org.spark-project - spark-bagel - ${project.version} - hadoop1 - runtime - - - org.spark-project - spark-examples - ${project.version} - hadoop1 - runtime - - - org.spark-project - spark-repl - ${project.version} - hadoop1 - runtime - - - org.apache.hadoop - hadoop-core - runtime - - - hadoop2 @@ -158,11 +149,6 @@ hadoop2 runtime - - org.apache.hadoop - hadoop-core - runtime - org.apache.hadoop hadoop-client diff --git a/repl/pom.xml b/repl/pom.xml index 862595b9f941e..81cebe178ab5f 100644 --- a/repl/pom.xml +++ b/repl/pom.xml @@ -37,6 +37,28 @@ + + org.spark-project + spark-core + ${project.version} + + + org.spark-project + spark-bagel + ${project.version} + runtime + + + org.spark-project + spark-examples + ${project.version} + runtime + + + org.apache.hadoop + hadoop-client + provided + org.eclipse.jetty jetty-server @@ -57,7 +79,6 @@ org.slf4j slf4j-log4j12 - org.scalatest scalatest_${scala.version} @@ -117,50 +138,6 @@ - - hadoop1 - - hadoop1 - - - - org.spark-project - spark-core - ${project.version} - hadoop1 - - - org.spark-project - spark-bagel - ${project.version} - hadoop1 - runtime - - - org.spark-project - spark-examples - ${project.version} - hadoop1 - runtime - - - org.apache.hadoop - hadoop-core - provided - - - - - - org.apache.maven.plugins - maven-jar-plugin - - hadoop1 - - - - - hadoop2 @@ -187,11 +164,6 @@ hadoop2 runtime - - org.apache.hadoop - hadoop-core - provided - org.apache.hadoop hadoop-client diff --git a/streaming/pom.xml b/streaming/pom.xml index 7e6b06d772fc0..9b478f7a0550d 100644 --- a/streaming/pom.xml +++ b/streaming/pom.xml @@ -40,6 +40,16 @@ + + org.spark-project + spark-core + ${project.version} + + + org.apache.hadoop + hadoop-client + provided + org.eclipse.jetty jetty-server @@ -117,33 +127,6 @@ - - hadoop1 - - - org.spark-project - spark-core - ${project.version} - hadoop1 - - - org.apache.hadoop - hadoop-core - provided - - - - - - org.apache.maven.plugins - maven-jar-plugin - - hadoop1 - - - - - hadoop2 @@ -153,11 +136,6 @@ ${project.version} hadoop2 - - org.apache.hadoop - hadoop-core - provided - org.apache.hadoop hadoop-client diff --git a/tools/pom.xml b/tools/pom.xml index 878eb82f18257..c123c2ab237d8 100644 --- a/tools/pom.xml +++ b/tools/pom.xml @@ -31,6 +31,21 @@ http://spark-project.org/ + + org.spark-project + spark-core + ${project.version} + + + org.spark-project + spark-streaming + ${project.version} + + + org.apache.hadoop + hadoop-client + provided + org.scalatest scalatest_${scala.version} @@ -58,39 +73,6 @@ - - hadoop1 - - - org.spark-project - spark-core - ${project.version} - hadoop1 - - - org.spark-project - spark-streaming - ${project.version} - hadoop1 - - - org.apache.hadoop - hadoop-core - provided - - - - - - org.apache.maven.plugins - maven-jar-plugin - - hadoop1 - - - - - hadoop2 @@ -106,11 +88,6 @@ ${project.version} hadoop2 - - org.apache.hadoop - hadoop-core - provided - org.apache.hadoop hadoop-client