-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.sbt
111 lines (80 loc) · 4.03 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
import CommonBuild._
import com.typesafe.sbt.packager.docker.{Cmd, ExecCmd}
import de.heikoseeberger.sbtheader.license.Apache2_0
import de.zalando.play.generator.sbt.ApiFirstPlayScalaCodeGenerator.autoImport.playScalaAutogenerateTests
import play.sbt.routes.RoutesKeys.routesGenerator
import sbt.Keys.resolvers
organization in ThisBuild := "it.gov.daf"
name := "semantic_validator"
version in ThisBuild := "1.0.1"
val playVersion = "2.5.14"
lazy val root = (project in file(".")).enablePlugins(PlayScala, ApiFirstCore, ApiFirstPlayScalaCodeGenerator, ApiFirstSwaggerParser)
scalaVersion in ThisBuild := "2.11.8"
crossPaths := false
libraryDependencies ++= Seq(
cache,
ws,
filters,
"org.webjars" % "swagger-ui" % "3.0.7",
specs2 % Test,
"org.scalacheck" %% "scalacheck" % "1.12.4" % "test",
"me.jeffmay" %% "play-json-tests" % "1.5.0" % Test,
"org.scalatestplus.play" %% "scalatestplus-play" % "1.5.0" % Test,
"org.seleniumhq.selenium" % "selenium-java" % "2.48.2",
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.7.4",
"org.eclipse.rdf4j" % "rdf4j-runtime" % "2.2.2",
"org.eclipse.rdf4j" % "rdf4j-repository-sail" % "2.2.2",
"org.eclipse.rdf4j" % "rdf4j-repository-api" % "2.2.2",
"org.eclipse.rdf4j" % "rdf4j-sail-memory" % "2.2.2",
"org.eclipse.rdf4j" % "rdf4j-sail-nativerdf" % "2.2.2",
"com.github.jsonld-java" % "jsonld-java" % "0.9.0",
"org.scalatest" %% "scalatest" % "2.2.2" % Test,
"junit" % "junit" % "4.11" % Test,
"com.novocode" % "junit-interface" % "0.11" % Test,
// DISABLED: now copied source internally. CHECK sub-modules?
// "it.awave.kb" % "kb-core" % "0.0.1", // CHECK: see how to point to maven local!
// "it.almawave.linkeddata.kb" % "kb-core_2.11" % "0.0.1" cross CrossVersion.Disabled ,
// withSources() withJavadoc() cross CrossVersion.full
"ch.qos.logback" % "logback-classic" % "1.2.3" % "test"
)
resolvers ++= Seq(
Resolver.mavenLocal,
//"Local Maven" at Path.userHome.asFile.toURI.toURL + ".m2/repository"
"zalando-bintray" at "https://dl.bintray.com/zalando/maven",
"scalaz-bintray" at "http://dl.bintray.com/scalaz/releases",
"jeffmay" at "https://dl.bintray.com/jeffmay/maven",
Resolver.url("sbt-plugins", url("http://dl.bintray.com/zalando/sbt-plugins"))(Resolver.ivyStylePatterns)
)
// resolver for local maven repository
// CHECK: maven local artifacts does not conforms to expected scala version specific name
// resolvers += "Local Maven Repository" at s"file://${Path.userHome.absolutePath}/.m2/repository"
resolvers += Resolver.mavenLocal // Also use $HOME/.m2/repository
// Play provides two styles of routers, one expects its actions to be injected, the
// other, legacy style, accesses its actions statically.
routesGenerator := InjectedRoutesGenerator
apiFirstParsers := Seq(ApiFirstSwaggerParser.swaggerSpec2Ast.value).flatten
// play.modules.enabled += "modules.OnStartupModule"
playScalaAutogenerateTests := false
headers := Map(
"sbt" -> Apache2_0("2017", "TEAM PER LA TRASFORMAZIONE DIGITALE"),
"scala" -> Apache2_0("2017", "TEAM PER LA TRASFORMAZIONE DIGITALE"),
"conf" -> Apache2_0("2017", "TEAM PER LA TRASFORMAZIONE DIGITALE", "#"),
"properties" -> Apache2_0("2017", "TEAM PER LA TRASFORMAZIONE DIGITALE", "#"),
"yaml" -> Apache2_0("2017", "TEAM PER LA TRASFORMAZIONE DIGITALE", "#")
)
dockerBaseImage := "anapsix/alpine-java:8_jdk_unlimited"
dockerCommands := dockerCommands.value.flatMap {
case cmd@Cmd("FROM", _) => List(cmd,
Cmd("RUN", "apk update && apk add bash krb5-libs krb5"),
Cmd("RUN", "ln -sf /etc/krb5.conf /opt/jdk/jre/lib/security/krb5.conf")
)
case other => List(other)
}
dockerCommands += ExecCmd("ENTRYPOINT", s"bin/${name.value}", "-Dconfig.file=conf/production.conf")
dockerExposedPorts := Seq(9000)
dockerRepository := Option("10.98.74.120:5000")
// WART
// wartremoverErrors ++= Warts.unsafe
// Wart Remover Plugin Configuration
// wartremoverErrors ++= Warts.allBut(Wart.Nothing, Wart.PublicInference, Wart.Any, Wart.Equals)
// wartremoverExcluded ++= getRecursiveListOfFiles(baseDirectory.value / "target" / "scala-2.11" / "routes").toSeq