-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
57 lines (44 loc) · 1.98 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
// give the user a nice default project!
val sparkVersion = settingKey[String]("Spark version")
lazy val root = (project in file(".")).
settings(
inThisBuild(List(
organization := "com.holdenkarau",
scalaVersion := "2.12.13"
)),
name := "sparkDemoProject",
version := "0.0.1",
sparkVersion := "2.4.8",
javacOptions ++= Seq("-source", "1.8", "-target", "1.8"),
javaOptions ++= Seq("-Xms512M", "-Xmx2048M", "-XX:MaxPermSize=2048M", "-XX:+CMSClassUnloadingEnabled"),
scalacOptions ++= Seq("-deprecation", "-unchecked"),
parallelExecution in Test := false,
fork := true,
coverageHighlighting := true,
libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-streaming" % "2.4.8" % "provided",
"org.apache.spark" %% "spark-sql" % "2.4.8" % "provided",
"org.scalatest" %% "scalatest" % "3.2.2" % "test",
"org.scalacheck" %% "scalacheck" % "1.15.2" % "test",
"com.holdenkarau" %% "spark-testing-base" % "2.4.8_1.3.0" % "test"
),
// uses compile classpath for the run task, including "provided" jar (cf http://stackoverflow.com/a/21803413/3827)
run in Compile := Defaults.runTask(fullClasspath in Compile, mainClass in (Compile, run), runner in (Compile, run)).evaluated,
scalacOptions ++= Seq("-deprecation", "-unchecked"),
pomIncludeRepository := { x => false },
resolvers ++= Seq(
"sonatype-releases" at "https://oss.sonatype.org/content/repositories/releases/",
"Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/",
"Second Typesafe repo" at "https://repo.typesafe.com/typesafe/maven-releases/",
Resolver.sonatypeRepo("public")
),
pomIncludeRepository := { _ => false },
// publish settings
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
)