-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.sbt
98 lines (91 loc) · 3.63 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
lazy val sparkVersion = util.Properties.propOrElse("sparkVersion", "2.0.2")
lazy val localSparkVersion = sparkVersion.substring(0,sparkVersion.lastIndexOf(".")).replace('.', '_')
lazy val versionRegex = "(\\d+)\\.(\\d+).*".r
lazy val commonSettings = Seq(
organization := "io.hydrosphere",
version := "0.3.3",
scalaVersion := "2.11.8"
)
def addSources(sparkDir: String) = {
Seq(
unmanagedSourceDirectories in Compile += baseDirectory.value / sparkDir / "src" / "main" / "scala",
unmanagedSourceDirectories in Test += baseDirectory.value / sparkDir / "src" / "test" / "scala",
unmanagedResourceDirectories in Test += baseDirectory.value / sparkDir / "src" / "test" / "resources"
)
}
sparkVersion match {
case versionRegex("2", "0") => addSources("spark-2_0")
case versionRegex("2", "1") => addSources("spark-2_1")
case versionRegex("2", "2") => addSources("spark-2_2")
}
lazy val root = project.in(file("."))
.settings(commonSettings)
.settings(publishSettings)
.settings(
name := s"spark-ml-serving-$localSparkVersion",
libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-mllib" % sparkVersion % "provided",
"org.json4s" %% "json4s-native" % "3.2.11",
"com.twitter" % "parquet-hadoop-bundle" % "1.6.0",
"org.apache.parquet" % "parquet-common" % "1.7.0",
"org.apache.parquet" % "parquet-column" % "1.7.0",
"org.apache.parquet" % "parquet-hadoop" % "1.7.0",
"org.apache.parquet" % "parquet-avro" % "1.7.0",
"org.scalactic" %% "scalactic" % "3.0.3" % "test",
"org.scalatest" %% "scalatest" % "3.0.3" % "test"
)
)
lazy val publishSettings = Seq(
publishMavenStyle := true,
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/")
},
publishArtifact in Test := false,
pomIncludeRepository := { _ => false },
pomExtra := <url>https://github.com/Hydrospheredata/spark-ml-serving</url>
<licenses>
<license>
<name>Apache 2.0 License</name>
<url>https://github.com/Hydrospheredata/spark-ml-serving/blob/master/LICENSE</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>https://github.com/Hydrospheredata/spark-ml-serving.git</url>
<connection>https://github.com/Hydrospheredata/spark-ml-serving.git</connection>
</scm>
<developers>
<developer>
<id>mkf-simpson</id>
<name></name>
<url>https://github.com/mkf-simpson</url>
<organization>Hydrosphere</organization>
<organizationUrl>http://hydrosphere.io/</organizationUrl>
</developer>
<developer>
<id>leonid133</id>
<name>Leonid Blokhin</name>
<url>https://github.com/leonid133</url>
<organization>Hydrosphere</organization>
<organizationUrl>http://hydrosphere.io/</organizationUrl>
</developer>
<developer>
<id>KineticCookie</id>
<name>Bulat Lutfullin</name>
<url>https://github.com/KineticCookie</url>
<organization>Hydrosphere</organization>
<organizationUrl>http://hydrosphere.io/</organizationUrl>
</developer>
<developer>
<id>dos65</id>
<name>Vadim Chelyshov</name>
<url>https://github.com/dos65</url>
<organization>Hydrosphere</organization>
<organizationUrl>http://hydrosphere.io/</organizationUrl>
</developer>
</developers>
)