forked from anantprsd5/starchat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
121 lines (100 loc) · 4.32 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
import NativePackagerHelper._
import com.typesafe.sbt.packager.docker._
name := "StarChat"
organization := "com.getjenny"
crossScalaVersions := Seq("2.12.6")
resolvers ++= Seq("Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/",
Resolver.bintrayRepo("hseeberger", "maven"))
resolvers +=
"Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
resolvers +=
"Sonatype OSS Releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2"
libraryDependencies ++= {
val AkkaHttpVersion = "10.1.4"
val AkkaVersion = "2.5.15"
val BreezeVersion = "0.13.2"
val ESClientVersion = "6.4.0"
val Log4JVersion = "2.9.1"
val LogbackVersion = "1.2.3"
val ParboiledVersion = "2.1.4"
val RoundeightsHasherVersion = "1.2.0"
val ScalatestVersion = "3.0.5"
val ScalazVersion = "7.2.24"
val ScoptVersion = "3.7.0"
val TikaVersion = "1.18"
val ManausLibVersion = "1.0.1"
Seq(
"com.getjenny" %% "manaus-lib" % ManausLibVersion,
"ch.qos.logback" % "logback-classic" % LogbackVersion,
"com.github.scopt" %% "scopt" % ScoptVersion,
"com.roundeights" %% "hasher" % RoundeightsHasherVersion,
"com.typesafe.akka" %% "akka-actor" % AkkaVersion,
"com.typesafe.akka" %% "akka-contrib" % AkkaVersion,
"com.typesafe.akka" %% "akka-http" % AkkaHttpVersion,
"com.typesafe.akka" %% "akka-http-core" % AkkaHttpVersion,
"com.typesafe.akka" %% "akka-http-spray-json" % AkkaHttpVersion,
"com.typesafe.akka" %% "akka-http-testkit" % AkkaHttpVersion,
"com.typesafe.akka" %% "akka-slf4j" % AkkaVersion,
"com.typesafe.akka" %% "akka-stream" % AkkaVersion,
"com.typesafe.akka" %% "akka-testkit" % AkkaVersion,
"org.apache.logging.log4j" % "log4j-api" % Log4JVersion,
"org.apache.logging.log4j" % "log4j-core" % Log4JVersion,
"org.apache.tika" % "tika-app" % TikaVersion,
"org.apache.tika" % "tika-core" % TikaVersion,
"org.apache.tika" % "tika-parsers" % TikaVersion,
"edu.stanford.nlp" % "stanford-corenlp" % "3.7.0",
// Not integrated, High level rest API still miss
// delete by query: https://github.com/elastic/elasticsearch/issues/27205
//"org.elasticsearch.client" % "elasticsearch-rest-client" % ESClientVersion,
//"org.elasticsearch.client" % "elasticsearch-rest-high-level-client" % ESClientVersion,
"org.elasticsearch.client" % "transport" % ESClientVersion,
"org.elasticsearch" % "elasticsearch" % ESClientVersion,
"org.parboiled" %% "parboiled" % ParboiledVersion,
"org.scalanlp" %% "breeze" % BreezeVersion,
"org.scalanlp" %% "breeze-natives" % BreezeVersion,
"org.scalatest" %% "scalatest" % ScalatestVersion % "test",
"org.scalaz" %% "scalaz-core" % ScalazVersion
)
}
scalacOptions += "-deprecation"
scalacOptions += "-feature"
//scalacOptions += "-Ylog-classpath"
testOptions in Test += Tests.Argument("-oF")
enablePlugins(GitVersioning)
enablePlugins(GitBranchPrompt)
enablePlugins(JavaServerAppPackaging)
enablePlugins(UniversalPlugin)
enablePlugins(DockerPlugin)
enablePlugins(DockerComposePlugin)
git.useGitDescribe := true
//http://www.scala-sbt.org/sbt-native-packager/formats/docker.html
dockerCommands := Seq(
Cmd("FROM", "java:8"),
Cmd("RUN", "apt", "update"),
Cmd("RUN", "apt", "install", "-y", "netcat"),
Cmd("LABEL", "maintainer=\"Angelo Leto <[email protected]>\""),
Cmd("LABEL", "description=\"Docker container for StarChat\""),
Cmd("WORKDIR", "/"),
Cmd("ADD", "/opt/docker", "/starchat"),
Cmd("VOLUME", "/starchat/config"),
Cmd("VOLUME", "/starchat/log")
)
packageName in Docker := packageName.value
version in Docker := version.value
dockerRepository := Some("getjenny")
//dockerImageCreationTask := (publishLocal in Docker).value
composeNoBuild := true
composeFile := "docker-starchat/docker-compose.test.yml"
// Assembly settings
mainClass in Compile := Some("com.getjenny.starchat.Main")
fork in Test := true
javaOptions in Test ++= Seq("-Dconfig.file=./src/test/resources/application.conf")
// do not buffer test output
logBuffered in Test := false
mappings in Universal ++= {
// copy configuration files to config directory
directory("scripts") ++
contentOf("src/main/resources").toMap.mapValues("config/" + _).toSeq
}
scriptClasspath := Seq("../config/") ++ scriptClasspath.value
licenses := Seq(("GPLv2", url("https://www.gnu.org/licenses/old-licenses/gpl-2.0.md")))