-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
67 lines (61 loc) · 3.12 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name := "mason-spark"
version := "latest"
val scalaMajorVersion = "2.12"
scalaVersion := f"${scalaMajorVersion}.2"
val sparkVersion = "3.0.0"
val hadoopVersion = "2.7.4"
testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-oN")
libraryDependencies ++= Seq(
"org.apache.spark" %% s"spark-core" % sparkVersion,
"org.apache.spark" %% s"spark-sql" % sparkVersion,
"org.apache.spark" %% s"spark-hive" % sparkVersion,
"org.apache.hadoop" % "hadoop-aws" % hadoopVersion,
"org.apache.hadoop" % "hadoop-client" % hadoopVersion,
"com.amazonaws" % "aws-java-sdk" % "1.7.4",
"com.holdenkarau" %% s"spark-testing-base" % s"${sparkVersion}_1.0.0",
"com.github.scopt" %% "scopt" % "4.0.0-RC2",
"org.scalactic" %% "scalactic" % "3.1.1",
"org.scalatest" %% "scalatest" % "3.1.1" % "test"
)
assemblyMergeStrategy in assembly := {
case PathList("javax", "ws", xs @ _*) => MergeStrategy.last
case PathList("javax", "inject", xs @ _*) => MergeStrategy.last
case PathList("org", "apache", xs @ _*) => MergeStrategy.last
case PathList("com", "sun", xs @ _*) => MergeStrategy.first
case PathList("org", "glassfish", xs @ _*) => MergeStrategy.last
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", "datanucleus", xs @ _*) => MergeStrategy.last
case PathList("io", "netty", xs @ _*) => MergeStrategy.last
case PathList("com", "yammer", xs @ _*) => MergeStrategy.last
case PathList("com", "fasterxml", xs @ _*) => MergeStrategy.last
case PathList("com", "amazonaws", xs @_*) => MergeStrategy.last
case PathList("org", "aopalliance", xs @_*) => MergeStrategy.last
case PathList("javax", "xml", xs @_*) => MergeStrategy.last
case PathList("javax", "jdo", xs @_*) => MergeStrategy.last
case PathList("org", "objenesis", xs @_*) => MergeStrategy.last
case PathList("codegen", "config.fmpp") => MergeStrategy.first
case PathList("io", "github") => MergeStrategy.first
case PathList("META-INF", xs @ _*) => MergeStrategy.discard
case "about.html" => MergeStrategy.rename
case "git.properties" => MergeStrategy.rename
case "mime.types" => MergeStrategy.rename
case "jetty-dir.css" => MergeStrategy.last
case "plugin.properties" => MergeStrategy.last
case "log4j.properties" => MergeStrategy.last
case "parquet.thrift" => MergeStrategy.last
case "plugin.xml" => MergeStrategy.last
case ".gitkeep" => MergeStrategy.last
case "mozilla/public-suffix-list.txt" => MergeStrategy.last
case "module-info.class" => MergeStrategy.last
case PathList(ps @ _*) if ps.last endsWith ".html" => MergeStrategy.discard
case PathList(ps @ _*) if ps.last endsWith ".thrift" => MergeStrategy.first
case PathList(ps @ _*) if ps.last endsWith ".xml" => MergeStrategy.first
case x =>
val oldStrategy = (assemblyMergeStrategy in assembly).value
oldStrategy(x)
}