This repository has been archived by the owner on Nov 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.sbt
60 lines (50 loc) · 1.73 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
import scala.xml.XML
organization := "com.github.jongwook"
name := "spark-ranking-metrics"
isSnapshot := version.value.endsWith("-SNAPSHOT")
scalaVersion := "2.11.8"
libraryDependencies ++= Seq("provided", "test").map { config =>
"org.apache.spark" %% "spark-mllib" % "2.0.0" % config
} ++ Seq(
"org.scalatest" %% "scalatest" % "3.0.0" % "test",
"net.recommenders.rival" % "rival-evaluate" % "0.2" % "test"
)
releasePublishArtifactsAction := PgpKeys.publishSigned.value
credentials ++= {
val settings = new File(System.getProperty("user.home")) / ".m2" / "settings.xml"
if (settings.exists()) {
val xml = XML.loadFile(new File(System.getProperty("user.home")) / ".m2" / "settings.xml")
for (server <- xml \\ "server" if (server \ "id").text == "ossrh") yield {
Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", (server \ "username").text, (server \ "password").text)
}
} else Nil
}
publishTo := {
if (isSnapshot.value) {
Some("apache" at "https://oss.sonatype.org/content/repositories/snapshots")
} else {
Some("apache" at "https://oss.sonatype.org/service/local/staging/deploy/maven2")
}
}
pomIncludeRepository := { _ => false }
pomExtra := {
<url>http://github.com/jongwook/spark-ranking-metrics</url>
<licenses>
<license>
<name>Unlicense</name>
<url>http://unlicense.org/</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:jongwook/spark-ranking-metrics.git</url>
<connection>scm:git:[email protected]:jongwook/spark-ranking-metrics.git</connection>
</scm>
<developers>
<developer>
<id>jongwook</id>
<name>Jong Wook Kim</name>
<url>http://jongwook.kim</url>
</developer>
</developers>
}