-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
160 lines (147 loc) · 6.81 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
lazy val commonSettings = Seq(
organization := "me.flygare",
version := "1.0",
scalaVersion := "2.11.8",
test in assembly := {}
)
lazy val monolithic = (project in file("Monolithic"))
.settings(
commonSettings,
name := "Monolithic",
libraryDependencies ++= Seq(
"com.datastax.spark" %% "spark-cassandra-connector" % "2.0.1",
"org.apache.spark" %% "spark-core" % "2.1.0",
"org.apache.spark" %% "spark-sql" % "2.1.0",
"org.scalatest" %% "scalatest" % "3.0.1" % "test",
"com.typesafe.akka" %% "akka-http-core" % "10.0.5",
"com.typesafe.akka" %% "akka-http" % "10.0.5",
"com.typesafe.akka" %% "akka-http-testkit" % "10.0.5",
"com.typesafe.akka" %% "akka-http-spray-json" % "10.0.5",
"com.typesafe.akka" %% "akka-http-jackson" % "10.0.5",
// To use jackson 2.8.7 over 2.6.5, todo fix the duplicate in dependencies
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.8.7",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.8.7"
),
resolvers ++= Seq(
"Spark Packages Repo" at "https://dl.bintray.com/spark-packages/maven"
),
mainClass in(Compile, run) := Some(s"$organization.$name"),
mainClass in assembly := Some(s"$organization.$name"),
assemblyJarName in assembly := "monolithic.jar",
assemblyMergeStrategy in assembly := {
case PathList("reference.conf") => MergeStrategy.concat
case PathList("META-INF", "services", "org.apache.hadoop.fs.FileSystem") => MergeStrategy.filterDistinctLines
case PathList("META-INF", xs @ _*) => MergeStrategy.discard
case x => MergeStrategy.first
}
)
lazy val restService = (project in file("RestService"))
.settings(
commonSettings,
name := "RestService",
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-http-core" % "10.0.5",
"com.typesafe.akka" %% "akka-http" % "10.0.5",
"com.typesafe.akka" %% "akka-http-testkit" % "10.0.5",
"com.typesafe.akka" %% "akka-http-spray-json" % "10.0.5",
"com.typesafe.akka" %% "akka-http-jackson" % "10.0.5",
"org.scalatest" %% "scalatest" % "3.0.1" % "test"
),
mainClass in (Compile,run) := Some(s"$organization.$name"),
mainClass in assembly := Some(s"$organization.$name"),
assemblyJarName in assembly := "restService.jar"
)
lazy val addressService = (project in file("AddressService"))
.settings(
commonSettings,
name := "AddressService",
libraryDependencies ++= Seq(
"com.datastax.spark" %% "spark-cassandra-connector" % "2.0.1",
"org.apache.spark" %% "spark-core" % "2.1.0",
"org.apache.spark" %% "spark-sql" % "2.1.0",
"org.scalatest" %% "scalatest" % "3.0.1" % "test",
"com.typesafe.akka" %% "akka-http-core" % "10.0.5",
"com.typesafe.akka" %% "akka-http" % "10.0.5",
"com.typesafe.akka" %% "akka-http-testkit" % "10.0.5",
"com.typesafe.akka" %% "akka-http-spray-json" % "10.0.5",
"com.typesafe.akka" %% "akka-http-jackson" % "10.0.5",
// To use jackson 2.8.7 over 2.6.5, todo fix the duplicate in dependencies
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.8.7",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.8.7"
),
resolvers ++= Seq(
"Spark Packages Repo" at "https://dl.bintray.com/spark-packages/maven"
),
mainClass in(Compile, run) := Some(s"$organization.$name"),
mainClass in assembly := Some(s"$organization.$name"),
assemblyJarName in assembly := "addressService.jar",
assemblyMergeStrategy in assembly := {
case PathList("reference.conf") => MergeStrategy.concat
case PathList("META-INF", "services", "org.apache.hadoop.fs.FileSystem") => MergeStrategy.filterDistinctLines
case PathList("META-INF", xs @ _*) => MergeStrategy.discard
case x => MergeStrategy.first
}
)
lazy val profileService = (project in file("ProfileService"))
.settings(
commonSettings,
name := "ProfileService",
libraryDependencies ++= Seq(
"com.datastax.spark" %% "spark-cassandra-connector" % "2.0.1",
"org.apache.spark" %% "spark-core" % "2.1.0",
"org.apache.spark" %% "spark-sql" % "2.1.0",
"org.scalatest" %% "scalatest" % "3.0.1" % "test",
"com.typesafe.akka" %% "akka-http-core" % "10.0.5",
"com.typesafe.akka" %% "akka-http" % "10.0.5",
"com.typesafe.akka" %% "akka-http-testkit" % "10.0.5",
"com.typesafe.akka" %% "akka-http-spray-json" % "10.0.5",
"com.typesafe.akka" %% "akka-http-jackson" % "10.0.5",
// To use jackson 2.8.7 over 2.6.5, todo fix the duplicate in dependencies
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.8.7",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.8.7"
),
resolvers ++= Seq(
"Spark Packages Repo" at "https://dl.bintray.com/spark-packages/maven"
),
mainClass in(Compile, run) := Some(s"$organization.$name"),
mainClass in assembly := Some(s"$organization.$name"),
assemblyJarName in assembly := "profileService.jar",
assemblyMergeStrategy in assembly := {
case PathList("reference.conf") => MergeStrategy.concat
case PathList("META-INF", "services", "org.apache.hadoop.fs.FileSystem") => MergeStrategy.filterDistinctLines
case PathList("META-INF", xs @ _*) => MergeStrategy.discard
case x => MergeStrategy.first
}
)
lazy val personService = (project in file("PersonService"))
.settings(
commonSettings,
name := "PersonService",
libraryDependencies ++= Seq(
"com.datastax.spark" %% "spark-cassandra-connector" % "2.0.1",
"org.apache.spark" %% "spark-core" % "2.1.0",
"org.apache.spark" %% "spark-sql" % "2.1.0",
"org.scalatest" %% "scalatest" % "3.0.1" % "test",
"com.typesafe.akka" %% "akka-http-core" % "10.0.5",
"com.typesafe.akka" %% "akka-http" % "10.0.5",
"com.typesafe.akka" %% "akka-http-testkit" % "10.0.5",
"com.typesafe.akka" %% "akka-http-spray-json" % "10.0.5",
"com.typesafe.akka" %% "akka-http-jackson" % "10.0.5",
// To use jackson 2.8.7 over 2.6.5, todo fix the duplicate in dependencies
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.8.7",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.8.7"
),
resolvers ++= Seq(
"Spark Packages Repo" at "https://dl.bintray.com/spark-packages/maven"
),
mainClass in(Compile, run) := Some(s"$organization.$name"),
mainClass in assembly := Some(s"$organization.$name"),
assemblyJarName in assembly := "personService.jar",
assemblyMergeStrategy in assembly := {
case PathList("reference.conf") => MergeStrategy.concat
case PathList("META-INF", "services", "org.apache.hadoop.fs.FileSystem") => MergeStrategy.filterDistinctLines
case PathList("META-INF", xs @ _*) => MergeStrategy.discard
case x => MergeStrategy.first
}
)
enablePlugins(AssemblyPlugin)