Skip to content

Commit

Permalink
Merge pull request datastax#1012 from datastax/SPARKC-355
Browse files Browse the repository at this point in the history
SPARKC-355: Shade Guava and Netty, remove Apache Commons.
  • Loading branch information
pkolaczk authored Aug 3, 2016
2 parents afded21 + 3c709cf commit eb20be8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
7 changes: 7 additions & 0 deletions project/Settings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,13 @@ object Settings extends Build {
case PathList("META-INF", xs @ _*) => MergeStrategy.last
case x => old(x)
}
},
assemblyShadeRules in assembly := {
val shadePackage = "shade.com.datastax.spark.connector"
Seq(
ShadeRule.rename("com.google.common.**" -> s"$shadePackage.google.common.@1").inAll,
ShadeRule.rename("io.netty.**" -> s"$shadePackage.netty.@1").inAll
)
}
)

Expand Down
3 changes: 1 addition & 2 deletions project/SparkCassandraConnectorBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ object Artifacts {
val akkaSlf4j = "com.typesafe.akka" %% "akka-slf4j" % Akka % "provided" // ApacheV2
val cassandraClient = "org.apache.cassandra" % "cassandra-clientutil" % Settings.cassandraTestVersion guavaExclude // ApacheV2
val cassandraDriver = "com.datastax.cassandra" % "cassandra-driver-core" % CassandraDriver guavaExclude // ApacheV2
val commonsLang3 = "org.apache.commons" % "commons-lang3" % CommonsLang3 // ApacheV2
val config = "com.typesafe" % "config" % Config % "provided" // ApacheV2
val guava = "com.google.guava" % "guava" % Guava
val jodaC = "org.joda" % "joda-convert" % JodaC
Expand Down Expand Up @@ -264,7 +263,7 @@ object Dependencies {
val spark = Seq(sparkCore, sparkStreaming, sparkSql, sparkCatalyst, sparkHive, sparkUnsafe)

val connector = testKit ++ metrics ++ jetty ++ logging ++ akka ++ cassandra ++ spark.map(_ % "provided") ++ Seq(
commonsLang3, config, guava, jodaC, jodaT, lzf, jsr166e)
config, guava, jodaC, jodaT, lzf, jsr166e)

val embedded = logging ++ spark ++ cassandra ++ Seq(
cassandraServer % "it,test", Embedded.jopt, Embedded.sparkRepl, Embedded.kafka, Embedded.snappy, guava)
Expand Down
4 changes: 3 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ resolvers += "Spark Packages Main repo" at "https://dl.bintray.com/spark-package

addSbtPlugin("org.spark-packages" %% "sbt-spark-package" % "0.2.3")

addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.2.6")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.2.6")

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.3")

0 comments on commit eb20be8

Please sign in to comment.