-
Notifications
You must be signed in to change notification settings - Fork 172
/
build.sbt
75 lines (57 loc) · 2.87 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
70
71
72
73
74
75
import scalariform.formatter.preferences._
import com.typesafe.sbt.SbtScalariform
import com.typesafe.sbt.SbtScalariform.ScalariformKeys
name := "universal-recommender"
version := "0.7.3"
organization := "com.actionml"
scalaVersion := "2.11.11"
scalaVersion in ThisBuild := "2.11.11"
val mahoutVersion = "0.13.0"
val pioVersion = "0.12.0-incubating"
val elasticsearchVersion = "5.5.2"
val sparkVersion = "2.1.1"
libraryDependencies ++= Seq(
"org.apache.predictionio" %% "apache-predictionio-core" % pioVersion % "provided",
"org.elasticsearch.client" % "rest" % elasticsearchVersion,
"org.elasticsearch" %% "elasticsearch-spark-20" % elasticsearchVersion % "provided"
exclude("org.apache.spark", "*"),
"org.elasticsearch" % "elasticsearch-hadoop-mr" % elasticsearchVersion % "provided",
"org.apache.spark" %% "spark-core" % "2.1.1" % "provided",
"org.apache.spark" %% "spark-mllib" % "2.1.1" % "provided",
"org.xerial.snappy" % "snappy-java" % "1.1.1.7",
// Mahout's Spark libs. They're custom compiled for Scala 2.11
// and included in the local Maven repo in the .custom-scala-m2/repo resolver below
"org.apache.mahout" %% "mahout-math-scala" % mahoutVersion,
"org.apache.mahout" %% "mahout-spark" % mahoutVersion
exclude("org.apache.spark", "spark-core_2.11"),
"org.apache.mahout" % "mahout-math" % mahoutVersion,
"org.apache.mahout" % "mahout-hdfs" % mahoutVersion
exclude("com.thoughtworks.xstream", "xstream")
exclude("org.apache.hadoop", "hadoop-client"),
// other external libs
"com.thoughtworks.xstream" % "xstream" % "1.4.4"
exclude("xmlpull", "xmlpull"),
"org.json4s" %% "json4s-native" % "3.2.10")
.map(_.exclude("org.apache.lucene","lucene-core")).map(_.exclude("org.apache.lucene","lucene-analyzers-common"))
//resolvers += "Local Repository" at "file:///<path-to>/.custom-scala-m2/repo"
resolvers += "Temp Scala 2.11 build of Mahout" at "https://github.com/actionml/mahout_2.11/raw/mvn-repo/"
resolvers += Resolver.mavenLocal
SbtScalariform.scalariformSettings
ScalariformKeys.preferences := ScalariformKeys.preferences.value
.setPreference(AlignSingleLineCaseStatements, true)
.setPreference(DoubleIndentClassDeclaration, true)
.setPreference(DanglingCloseParenthesis, Prevent)
.setPreference(MultilineScaladocCommentsStartOnFirstLine, true)
assemblyMergeStrategy in assembly := {
case "plugin.properties" => MergeStrategy.discard
case PathList(ps @ _*) if ps.last endsWith "package-info.class" =>
MergeStrategy.first
case PathList(ps @ _*) if ps.last endsWith "UnusedStubClass.class" =>
MergeStrategy.first
case x =>
val oldStrategy = (assemblyMergeStrategy in assembly).value
oldStrategy(x)
}
//assemblyShadeRules in assembly := Seq(
// ShadeRule.rename("org.apache.http.**" -> "shadeio.ur.data.http.@1").inAll,
// ShadeRule.rename("org.elasticsearch.client.**" -> "shadeio.ur.data.client.@1").inAll)