forked from sclasen/akka-zk-cluster-seed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
99 lines (87 loc) · 3.65 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
import com.typesafe.sbt.SbtMultiJvm
import com.typesafe.sbt.SbtMultiJvm.MultiJvmKeys.MultiJvm
organization := "com.sclasen"
name := "akka-zk-cluster-seed"
version := "0.1.10-SNAPSHOT"
scalaVersion := "2.11.8"
crossScalaVersions := Seq(scalaVersion.value, "2.12.1")
val akkaVersion = "2.4.18"
val akkaHttpVersion = "10.0.6"
val akkaDependencies = Seq(
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
"com.typesafe.akka" %% "akka-cluster" % akkaVersion,
"com.typesafe.akka" %% "akka-cluster-tools" % akkaVersion
)
val exhibitorOptionalDependencies = Seq(
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
"com.typesafe.akka" %% "akka-http-core" % akkaHttpVersion,
"org.slf4j" % "log4j-over-slf4j" % "1.7.7",
"ch.qos.logback" % "logback-classic" % "1.1.2",
"com.typesafe.akka" %% "akka-http-spray-json" % akkaHttpVersion
).map(_ % Provided)
val curatorVersion = "2.11.0"
val zkDependencies = Seq(
"curator-framework",
"curator-recipes"
).map {
"org.apache.curator" % _ % curatorVersion exclude("log4j", "log4j") exclude("org.slf4j", "slf4j-log4j12")
}
val testDependencies = Seq(
"com.typesafe.akka" %% "akka-testkit" % akkaVersion,
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
"com.typesafe.akka" %% "akka-cluster" % akkaVersion,
"org.scalatest" %% "scalatest" % "3.0.1",
"com.typesafe.akka" %% "akka-multi-node-testkit" % akkaVersion,
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
"org.slf4j" % "log4j-over-slf4j" % "1.7.7",
"ch.qos.logback" % "logback-classic" % "1.1.2",
"org.apache.curator" % "curator-test" % curatorVersion
).map(_ % Test)
lazy val rootProject = (project in file(".")).
settings(
libraryDependencies ++= (akkaDependencies ++ exhibitorOptionalDependencies ++ zkDependencies ++ testDependencies),
scalacOptions in Compile ++= Seq("-encoding", "UTF-8", "-deprecation", "-feature", "-unchecked", "-Xlog-reflective-calls", "-Xlint", "-language:postfixOps"),
javacOptions in Compile ++= Seq("-Xlint:unchecked", "-Xlint:deprecation"),
parallelExecution in Test := false,
pomExtra := (
<url>http://github.com/sclasen/akka-zk-cluster-seed</url>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:sclasen/akka-zk-cluster-seed.git</url>
<connection>scm:git:[email protected]:sclasen/akka-zk-cluster-seed.git</connection>
</scm>
<developers>
<developer>
<id>sclasen</id>
<name>Scott Clasen</name>
<url>http://github.com/sclasen</url>
</developer>
</developers>),
publishTo := {
val v = version.value
val nexus = "https://oss.sonatype.org/"
if (v.trim.endsWith("SNAPSHOT")) Some("snapshots" at nexus + "content/repositories/snapshots")
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
).
settings(Defaults.itSettings:_*).
settings(SbtMultiJvm.multiJvmSettings:_*).
settings(compile in MultiJvm <<= (compile in MultiJvm) triggeredBy (compile in IntegrationTest)).
settings(executeTests in IntegrationTest <<= (executeTests in Test, executeTests in MultiJvm) map {
case (testResults, multiNodeResults) =>
val overall =
if (testResults.overall.id < multiNodeResults.overall.id)
multiNodeResults.overall
else
testResults.overall
Tests.Output(overall,
testResults.events ++ multiNodeResults.events,
testResults.summaries ++ multiNodeResults.summaries)
}).
configs(IntegrationTest, MultiJvm)