Skip to content

Commit fd31adb

Browse files
srowenpwendell
authored andcommitted
SPARK-1084.2 (resubmitted)
(Ported from https://github.com/apache/incubator-spark/pull/650 ) This adds one more change though, to fix the scala version warning introduced by json4s recently. Author: Sean Owen <[email protected]> Closes #32 from srowen/SPARK-1084.2 and squashes the following commits: 9240abd [Sean Owen] Avoid scala version conflict in scalap induced by json4s dependency 1561cec [Sean Owen] Remove "exclude *" dependencies that are causing Maven warnings, and that are apparently unneeded anyway
1 parent 353ac6b commit fd31adb

File tree

6 files changed

+22
-61
lines changed

6 files changed

+22
-61
lines changed

core/pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,15 @@
125125
<groupId>org.json4s</groupId>
126126
<artifactId>json4s-jackson_${scala.binary.version}</artifactId>
127127
<version>3.2.6</version>
128+
<!-- see also exclusion for lift-json; this is necessary since it depends on
129+
scala-library and scalap 2.10.0, but we use 2.10.3, and only override
130+
scala-library -->
131+
<exclusions>
132+
<exclusion>
133+
<groupId>org.scala-lang</groupId>
134+
<artifactId>scalap</artifactId>
135+
</exclusion>
136+
</exclusions>
128137
</dependency>
129138
<dependency>
130139
<groupId>it.unimi.dsi</groupId>

examples/pom.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,6 @@
169169
<groupId>org.apache.cassandra.deps</groupId>
170170
<artifactId>avro</artifactId>
171171
</exclusion>
172-
<exclusion>
173-
<groupId>org.sonatype.sisu.inject</groupId>
174-
<artifactId>*</artifactId>
175-
</exclusion>
176-
<exclusion>
177-
<groupId>org.xerial.snappy</groupId>
178-
<artifactId>*</artifactId>
179-
</exclusion>
180172
</exclusions>
181173
</dependency>
182174
</dependencies>

external/flume/pom.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@
5353
<groupId>org.jboss.netty</groupId>
5454
<artifactId>netty</artifactId>
5555
</exclusion>
56-
<exclusion>
57-
<groupId>org.xerial.snappy</groupId>
58-
<artifactId>*</artifactId>
59-
</exclusion>
6056
</exclusions>
6157
</dependency>
6258
<dependency>

pom.xml

Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,9 @@
310310
<groupId>net.liftweb</groupId>
311311
<artifactId>lift-json_${scala.binary.version}</artifactId>
312312
<version>2.5.1</version>
313+
<!-- see also exclusion for json4s; this is necessary since it depends on
314+
scala-library and scalap 2.10.0, but we use 2.10.3, and only override
315+
scala-library -->
313316
<exclusions>
314317
<exclusion>
315318
<groupId>org.scala-lang</groupId>
@@ -374,7 +377,7 @@
374377
<version>3.1</version>
375378
<scope>test</scope>
376379
</dependency>
377-
<dependency>
380+
<dependency>
378381
<groupId>org.mockito</groupId>
379382
<artifactId>mockito-all</artifactId>
380383
<version>1.8.5</version>
@@ -416,14 +419,6 @@
416419
<groupId>org.jboss.netty</groupId>
417420
<artifactId>netty</artifactId>
418421
</exclusion>
419-
<exclusion>
420-
<groupId>org.codehaus.jackson</groupId>
421-
<artifactId>*</artifactId>
422-
</exclusion>
423-
<exclusion>
424-
<groupId>org.sonatype.sisu.inject</groupId>
425-
<artifactId>*</artifactId>
426-
</exclusion>
427422
<exclusion>
428423
<groupId>commons-logging</groupId>
429424
<artifactId>commons-logging</artifactId>
@@ -448,14 +443,6 @@
448443
<groupId>org.jboss.netty</groupId>
449444
<artifactId>netty</artifactId>
450445
</exclusion>
451-
<exclusion>
452-
<groupId>org.codehaus.jackson</groupId>
453-
<artifactId>*</artifactId>
454-
</exclusion>
455-
<exclusion>
456-
<groupId>org.sonatype.sisu.inject</groupId>
457-
<artifactId>*</artifactId>
458-
</exclusion>
459446
</exclusions>
460447
</dependency>
461448
<dependency>
@@ -471,14 +458,6 @@
471458
<groupId>org.jboss.netty</groupId>
472459
<artifactId>netty</artifactId>
473460
</exclusion>
474-
<exclusion>
475-
<groupId>org.codehaus.jackson</groupId>
476-
<artifactId>*</artifactId>
477-
</exclusion>
478-
<exclusion>
479-
<groupId>org.sonatype.sisu.inject</groupId>
480-
<artifactId>*</artifactId>
481-
</exclusion>
482461
</exclusions>
483462
</dependency>
484463

@@ -495,14 +474,6 @@
495474
<groupId>org.jboss.netty</groupId>
496475
<artifactId>netty</artifactId>
497476
</exclusion>
498-
<exclusion>
499-
<groupId>org.codehaus.jackson</groupId>
500-
<artifactId>*</artifactId>
501-
</exclusion>
502-
<exclusion>
503-
<groupId>org.sonatype.sisu.inject</groupId>
504-
<artifactId>*</artifactId>
505-
</exclusion>
506477
</exclusions>
507478
</dependency>
508479
</dependencies>

project/SparkBuild.scala

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,11 @@ object SparkBuild extends Build {
243243

244244
val slf4jVersion = "1.7.5"
245245

246-
val excludeCglib = ExclusionRule(organization = "org.sonatype.sisu.inject")
247-
val excludeJackson = ExclusionRule(organization = "org.codehaus.jackson")
248246
val excludeNetty = ExclusionRule(organization = "org.jboss.netty")
249247
val excludeAsm = ExclusionRule(organization = "asm")
250-
val excludeSnappy = ExclusionRule(organization = "org.xerial.snappy")
251248
val excludeCommonsLogging = ExclusionRule(organization = "commons-logging")
252249
val excludeSLF4J = ExclusionRule(organization = "org.slf4j")
250+
val excludeScalap = ExclusionRule(organization = "org.scala-lang", artifact = "scalap")
253251

254252
def coreSettings = sharedSettings ++ Seq(
255253
name := "spark-core",
@@ -273,13 +271,13 @@ object SparkBuild extends Build {
273271
"org.spark-project.akka" %% "akka-remote" % "2.2.3-shaded-protobuf" excludeAll(excludeNetty),
274272
"org.spark-project.akka" %% "akka-slf4j" % "2.2.3-shaded-protobuf" excludeAll(excludeNetty),
275273
"org.spark-project.akka" %% "akka-testkit" % "2.2.3-shaded-protobuf" % "test",
276-
"org.json4s" %% "json4s-jackson" % "3.2.6",
274+
"org.json4s" %% "json4s-jackson" % "3.2.6" excludeAll(excludeScalap),
277275
"it.unimi.dsi" % "fastutil" % "6.4.4",
278276
"colt" % "colt" % "1.2.0",
279277
"org.apache.mesos" % "mesos" % "0.13.0",
280278
"net.java.dev.jets3t" % "jets3t" % "0.7.1" excludeAll(excludeCommonsLogging),
281279
"org.apache.derby" % "derby" % "10.4.2.0" % "test",
282-
"org.apache.hadoop" % hadoopClient % hadoopVersion excludeAll(excludeJackson, excludeNetty, excludeAsm, excludeCglib, excludeCommonsLogging, excludeSLF4J),
280+
"org.apache.hadoop" % hadoopClient % hadoopVersion excludeAll(excludeNetty, excludeAsm, excludeCommonsLogging, excludeSLF4J),
283281
"org.apache.curator" % "curator-recipes" % "2.4.0" excludeAll(excludeNetty),
284282
"com.codahale.metrics" % "metrics-core" % "3.0.0",
285283
"com.codahale.metrics" % "metrics-jvm" % "3.0.0",
@@ -316,7 +314,7 @@ object SparkBuild extends Build {
316314
exclude("io.netty", "netty")
317315
exclude("jline","jline")
318316
exclude("org.apache.cassandra.deps", "avro")
319-
excludeAll(excludeSnappy, excludeCglib, excludeSLF4J)
317+
excludeAll(excludeSLF4J)
320318
)
321319
) ++ assemblySettings ++ extraAssemblySettings
322320

@@ -379,10 +377,10 @@ object SparkBuild extends Build {
379377
def yarnEnabledSettings = Seq(
380378
libraryDependencies ++= Seq(
381379
// Exclude rule required for all ?
382-
"org.apache.hadoop" % hadoopClient % hadoopVersion excludeAll(excludeJackson, excludeNetty, excludeAsm, excludeCglib),
383-
"org.apache.hadoop" % "hadoop-yarn-api" % hadoopVersion excludeAll(excludeJackson, excludeNetty, excludeAsm, excludeCglib),
384-
"org.apache.hadoop" % "hadoop-yarn-common" % hadoopVersion excludeAll(excludeJackson, excludeNetty, excludeAsm, excludeCglib),
385-
"org.apache.hadoop" % "hadoop-yarn-client" % hadoopVersion excludeAll(excludeJackson, excludeNetty, excludeAsm, excludeCglib)
380+
"org.apache.hadoop" % hadoopClient % hadoopVersion excludeAll(excludeNetty, excludeAsm),
381+
"org.apache.hadoop" % "hadoop-yarn-api" % hadoopVersion excludeAll(excludeNetty, excludeAsm),
382+
"org.apache.hadoop" % "hadoop-yarn-common" % hadoopVersion excludeAll(excludeNetty, excludeAsm),
383+
"org.apache.hadoop" % "hadoop-yarn-client" % hadoopVersion excludeAll(excludeNetty, excludeAsm)
386384
)
387385
)
388386

@@ -428,7 +426,7 @@ object SparkBuild extends Build {
428426
def flumeSettings() = sharedSettings ++ Seq(
429427
name := "spark-streaming-flume",
430428
libraryDependencies ++= Seq(
431-
"org.apache.flume" % "flume-ng-sdk" % "1.2.0" % "compile" excludeAll(excludeNetty, excludeSnappy)
429+
"org.apache.flume" % "flume-ng-sdk" % "1.2.0" % "compile" excludeAll(excludeNetty)
432430
)
433431
)
434432

streaming/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@
5555
<groupId>org.eclipse.jetty</groupId>
5656
<artifactId>jetty-server</artifactId>
5757
</dependency>
58-
<dependency>
59-
<groupId>org.codehaus.jackson</groupId>
60-
<artifactId>jackson-mapper-asl</artifactId>
61-
<version>1.9.11</version>
62-
</dependency>
6358
<dependency>
6459
<groupId>org.scala-lang</groupId>
6560
<artifactId>scala-library</artifactId>

0 commit comments

Comments
 (0)