-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
52 lines (41 loc) · 1.72 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
enablePlugins(UniversalPlugin)
name := "areovhusershappy"
version := "1.0"
scalaVersion := "2.11.8"
libraryDependencies += "org.apache.spark" %% "spark-core" % "2.2.0" % "provided"
libraryDependencies += "org.apache.spark" %% "spark-mllib" % "2.2.0" % "provided"
libraryDependencies += "org.apache.spark" %% "spark-sql" % "2.2.0" % "provided"
libraryDependencies += "org.twitter4j" % "twitter4j-core" % "4.0.6"
libraryDependencies += "edu.stanford.nlp" % "stanford-corenlp" % "3.8.0"
libraryDependencies += "edu.stanford.nlp" % "stanford-corenlp" % "3.8.0" classifier "models"
libraryDependencies += "org.slf4j" % "slf4j-api" % "1.7.9"
libraryDependencies += "org.slf4j" % "slf4j-log4j12" % "1.7.7"
libraryDependencies += "com.typesafe" % "config" % "1.3.2"
mainClass in Compile := Some("org.zappy.ovh.happiness")
// removes all jar mappings in universal and appends the fat jar
mappings in Universal := {
// universalMappings: Seq[(File,String)]
val universalMappings = (mappings in Universal).value
val fatJar = (assembly in Compile).value
// removing means filtering
val filtered = universalMappings filter {
case (_, name) => ! name.endsWith(".jar")
}
// add the fat jar
filtered :+ (fatJar -> ("lib/" + fatJar.getName))
}
mappings in Universal += {
//add the application.conf
val conf = (resourceDirectory in Compile).value / "application.conf"
conf -> "conf/application.conf"
}
mappings in Universal += {
// add the log4j.properties
val conf = (resourceDirectory in Compile).value / "log4j.properties"
conf -> "conf/log4j.properties"
}
mappings in Universal += {
// add the English stopwords
val conf = (resourceDirectory in Compile).value / "English_Stopwords.txt"
conf -> "conf/English_Stopwords.txt"
}