Skip to content

Instantly share code, notes, and snippets.

@rahulkumar-aws
Created June 16, 2021 03:43
Show Gist options
  • Save rahulkumar-aws/386da84f7283111d5ceb5d92351d234f to your computer and use it in GitHub Desktop.
Save rahulkumar-aws/386da84f7283111d5ceb5d92351d234f to your computer and use it in GitHub Desktop.
name := "data-scratchpad"
version := "0.1"
scalaVersion := "2.12.13"
val sparkVersion = "2.4.0"
// resourceDirectory in Compile := baseDirectory.value / "resources"
libraryDependencies += "org.apache.spark" %% "spark-core" % sparkVersion % "provided"
libraryDependencies += "org.apache.spark" %% "spark-sql" % sparkVersion % "provided"
libraryDependencies += "org.apache.spark" %% "spark-hive" % sparkVersion % "provided"
libraryDependencies += "org.apache.spark" %% "spark-avro" % sparkVersion
// https://mvnrepository.com/artifact/com.maxmind.geoip2/geoip2
libraryDependencies += "com.maxmind.geoip2" % "geoip2" % "2.15.0"
// https://mvnrepository.com/artifact/com.typesafe/config
libraryDependencies += "com.typesafe" % "config" % "1.4.1"
dependencyOverrides += "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.1"
dependencyOverrides ++= {
Seq(
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.6.7.1",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.6.7",
"com.fasterxml.jackson.core" % "jackson-core" % "2.6.7"
)
}
assemblyMergeStrategy in assembly := {
case PathList("javax", "servlet", xs@_*) => MergeStrategy.last
case PathList("javax", "activation", xs@_*) => MergeStrategy.last
case PathList("org", "apache", xs@_*) => MergeStrategy.last
case PathList("com", "google", xs@_*) => MergeStrategy.last
case PathList("com", "esotericsoftware", xs@_*) => MergeStrategy.last
case PathList("com", "codahale", xs@_*) => MergeStrategy.last
case PathList("com", "yammer", xs@_*) => MergeStrategy.last
case "about.html" => MergeStrategy.rename
case x if x.startsWith("META-INF/maven/org.slf4j/") => MergeStrategy.last
case x if x.contains(".html") => MergeStrategy.last
case x if x.contains(".thrift") => MergeStrategy.last
case x if x.contains(".xml") => MergeStrategy.last
case x if x.contains(".properties") => MergeStrategy.last
case x if x.contains(".tooling") => MergeStrategy.last
case x if x.contains("changelog.txt") => MergeStrategy.last
case x if x.contains(".class") => MergeStrategy.first
case x if x.contains(".txt") => MergeStrategy.last
case x if x.contains(".DS_Store") => MergeStrategy.last
case x if x.contains("mime") => MergeStrategy.last
case x if x.contains(".json") => MergeStrategy.first
case x if x.contains("tz/data") => MergeStrategy.first
case "META-INF/ECLIPSEF.RSA" => MergeStrategy.last
case "META-INF/mailcap" => MergeStrategy.last
case "META-INF/mimetypes.default" => MergeStrategy.last
case "META-INF/io.netty.versions.properties" => MergeStrategy.last
case "plugin.properties" => MergeStrategy.last
case "log4j.properties" => MergeStrategy.last
case x =>
val oldStrategy = (assemblyMergeStrategy in assembly).value
oldStrategy(x)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment