-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
36 lines (30 loc) · 1.18 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import sbt._
import Keys._
import sbtassembly.MergeStrategy
name := "SparkExample"
version := "0.1"
scalaVersion := "2.11.12"
val sparkVersion = "2.4.3"
libraryDependencies ++= Seq(
"com.typesafe" % "config" % "1.3.3",
"org.apache.spark" %% "spark-core" % sparkVersion,
"org.apache.spark" %% "spark-streaming" % sparkVersion,
"org.apache.spark" %% "spark-sql" % sparkVersion
)
unmanagedBase := baseDirectory.value/"libs"
val defaultMergeStrategy: String => MergeStrategy = {
case m if m.toLowerCase.endsWith("manifest.mf") => MergeStrategy.discard
case m if m.startsWith("META-INF") => MergeStrategy.discard
case PathList("javax", "servlet", xs@_*) => MergeStrategy.last
case PathList("org", "apache", xs@_*) => MergeStrategy.last
case PathList("org", "jboss", xs@_*) => MergeStrategy.last
case "log4j.properties" => MergeStrategy.discard
case "about.html" => MergeStrategy.rename
case "reference.conf" => MergeStrategy.concat
case _ => MergeStrategy.last
}
scalacOptions += "-deprecation"
mainClass in assembly := Some("com.spark.mail.Email")
test in assembly := {}
assemblyMergeStrategy in assembly := defaultMergeStrategy
assemblyJarName in assembly :="Spark_Example.jar"