-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.sbt
69 lines (55 loc) · 2.53 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
66
67
68
69
import AssemblyKeys._
assemblySettings
name := "keystone-example"
version := "0.4"
organization := "edu.berkeley.cs.amplab"
scalaVersion := "2.10.4"
parallelExecution in Test := false
libraryDependencies ++= Seq(
"org.slf4j" % "slf4j-api" % "1.7.2",
"org.slf4j" % "slf4j-log4j12" % "1.7.2",
"org.scalatest" %% "scalatest" % "1.9.1" % "test"
)
{
val defaultSparkVersion = "2.1.0"
val sparkVersion =
scala.util.Properties.envOrElse("SPARK_VERSION", defaultSparkVersion)
val excludeHadoop = ExclusionRule(organization = "org.apache.hadoop")
val excludeSpark = ExclusionRule(organization = "org.apache.spark")
libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-core" % sparkVersion excludeAll(excludeHadoop),
"org.apache.spark" %% "spark-mllib" % sparkVersion excludeAll(excludeHadoop),
"org.apache.spark" %% "spark-sql" % sparkVersion excludeAll(excludeHadoop),
"edu.berkeley.cs.amplab" %% "keystoneml" % "0.4.0" excludeAll(excludeHadoop, excludeSpark)
)
}
{
val defaultHadoopVersion = "2.6.0"
val hadoopVersion =
scala.util.Properties.envOrElse("SPARK_HADOOP_VERSION", defaultHadoopVersion)
libraryDependencies += "org.apache.hadoop" % "hadoop-client" % hadoopVersion
}
resolvers ++= Seq(
"Local Maven Repository" at Path.userHome.asFile.toURI.toURL + ".m2/repository",
"Typesafe" at "http://repo.typesafe.com/typesafe/releases",
"Cloudera Repository" at "https://repository.cloudera.com/artifactory/cloudera-repos/",
"Spray" at "http://repo.spray.cc",
"Bintray" at "http://dl.bintray.com/jai-imageio/maven/",
"ImageJ Public Maven Repo" at "http://maven.imagej.net/content/groups/public/"
)
resolvers += Resolver.sonatypeRepo("public")
mergeStrategy in assembly <<= (mergeStrategy in assembly) { (old) =>
{
case PathList("javax", "servlet", xs @ _*) => MergeStrategy.first
case PathList(ps @ _*) if ps.last endsWith ".html" => MergeStrategy.first
case "application.conf" => MergeStrategy.concat
case "reference.conf" => MergeStrategy.concat
case "log4j.properties" => MergeStrategy.first
case m if m.toLowerCase.endsWith("manifest.mf") => MergeStrategy.discard
case m if m.toLowerCase.matches("meta-inf.*\\.sf$") => MergeStrategy.discard
case m if m.toLowerCase.startsWith("meta-inf/services/") => MergeStrategy.filterDistinctLines
case _ => MergeStrategy.first
}
}
test in assembly := {}
jarName in assembly := "keystone-app-assembly.jar"