Skip to content

Commit

Permalink
Review feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcelo Vanzin committed Aug 13, 2014
1 parent 05e0a3d commit 819b445
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@
</includes>
</artifactSet>
<filters>
<!-- See comment in the guava dependency declaration above. -->
<filter>
<artifact>com.google.guava:guava</artifact>
<includes>
Expand Down
10 changes: 8 additions & 2 deletions project/SparkBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,12 @@ object Assembly {

}

/**
* Settings for the spark-core artifact. We don't want to expose Guava as a compile-time dependency,
* but at the same time the Java API exposes a Guava type (Optional). So we package it with the
* spark-core jar using the assembly plugin, and use the assembly deliverable as the main artifact
* for that project, disabling the non-assembly jar.
*/
object CoreAssembly {
import sbtassembly.Plugin._
import AssemblyKeys._
Expand All @@ -304,8 +310,8 @@ object CoreAssembly {
cp filter {!_.data.getName.startsWith("guava")}
},
mergeStrategy in assembly := {
case PathList("com", "google", "common", xs @ _*) =>
if (xs.size == 2 && xs(0) == "base" && xs(1).startsWith("Optional")) {
case PathList("com", "google", "common", "base", xs @ _*) =>
if (xs.size == 1 && xs(0).startsWith("Optional")) {
MergeStrategy.first
} else {
MergeStrategy.discard
Expand Down

0 comments on commit 819b445

Please sign in to comment.