-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
executable file
·73 lines (61 loc) · 2.34 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
scalaVersion in ThisBuild := "2.11.7"
val jacksonVersion = "2.4.4"//!!!!Need to Match Spark Version
resolvers += Resolver.sonatypeRepo("public")
lazy val commonTestDependencies = Seq(
"org.scalatest" %% "scalatest" % "2.1.7" % Test
)
def noPublish = Seq(
publish := {},
publishLocal := {}
)
val moduleName = Def.setting {
Artifact(name.value)
}
def publishFatJar() = Seq(
addArtifact(moduleName, assembly)
)
lazy val sparkDependencies = Seq(
("org.apache.spark" %% "spark-core" % "1.5.2" % "provided")
)
val commonTest = Project("common-test", file("common-test"))
.settings(
libraryDependencies ++= commonTestDependencies ++ Seq( )
)
val processing = Project("processing", file("processing"))
.settings(
libraryDependencies ++= sparkDependencies ++ commonTestDependencies ++ Seq(
"com.github.scopt" %% "scopt" % "3.4.0"
),
mainClass in Compile := Some("org.bjean.sample.wordcount.processor.WordCountApp")
)
.settings(publishFatJar : _*)
val inputGenerator = Project("input-generator", file("input-generator"))
.dependsOn(commonTest % "test->test")
.settings(
libraryDependencies ++= commonTestDependencies ++ Seq(
"org.apache.commons" % "commons-lang3" % "3.3.2",
"com.vtence.cli"%"cli"%"1.1"
),
mainClass in Compile := Some("org.bjean.sample.wordcount.input.DocumentGenerator")
)
.settings(publishFatJar : _*)
val awsLauncher = Project("aws-launcher", file("aws-launcher"))
.dependsOn(commonTest % "test->test")
.settings(
libraryDependencies ++= sparkDependencies ++ commonTestDependencies ++ Seq(
"com.amazonaws" % "aws-java-sdk-core" % "1.10.+",
"com.amazonaws" % "aws-java-sdk-ec2" % "1.10.+",
"com.amazonaws" % "aws-java-sdk-emr" % "1.10.+",
"com.amazonaws" % "aws-java-sdk-s3" % "1.10.+",
"com.typesafe.scala-logging" %% "scala-logging" % "3.1.0",
"com.github.scopt" %% "scopt" % "3.4.0",
"com.google.guava" % "guava-testlib" % "16.0.1" % "test",
"org.mockito" % "mockito-all" % "1.9.5" % "test"
),
mainClass in Compile := Some("org.bjean.sample.wordcount.aws.AwsLauncher")
)
.settings(publishFatJar : _*)
val root = Project("word-count-spark-aws", file("."))
.disablePlugins(AssemblyPlugin)
.settings(noPublish: _*)
.aggregate(inputGenerator,processing,awsLauncher)