-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.sbt
101 lines (85 loc) · 5.25 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
import com.typesafe.sbt.packager.docker
import com.typesafe.sbt.packager.docker.{DockerChmodType, ExecCmd}
import scalariform.formatter.preferences.*
val rokkuVersion = scala.sys.env.getOrElse("ROKKU_VERSION", "SNAPSHOT")
name := "rokku"
version := rokkuVersion
scalaVersion := "2.13.8"
scalacOptions += "-unchecked"
scalacOptions += "-deprecation"
scalacOptions ++= Seq("-encoding", "utf-8")
scalacOptions += "-target:11"
scalacOptions += "-feature"
scalacOptions += "-Xlint"
scalacOptions += "-Xfatal-warnings"
val akkaHttpVersion = "10.2.9"
val akkaVersion = "2.6.19"
val logbackJson = "0.1.5"
val metricVersion = "4.2.12"
libraryDependencies ++= Seq(
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.2",
"ch.qos.logback" % "logback-classic" % "1.4.7",
"ch.qos.logback.contrib" % "logback-json-classic" % logbackJson,
"ch.qos.logback.contrib" % "logback-jackson" % logbackJson exclude("com.fasterxml.jackson.core", "jackson-databind"),
"com.fasterxml.jackson.core" % "jackson-databind" % "2.15.1",
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
"com.typesafe.akka" %% "akka-stream" % akkaVersion,
"com.typesafe.akka" %% "akka-http-spray-json" % akkaHttpVersion,
"com.typesafe.akka" %% "akka-http-xml" % akkaHttpVersion,
"com.amazonaws" % "aws-java-sdk-s3" % "1.12.470",
"org.apache.kafka" % "kafka-clients" % "3.4.0",
"org.apache.ranger" % "ranger-plugins-common" % "2.4.0" exclude("org.eclipse.jetty", "jetty-io") exclude("com.amazonaws", "aws-java-sdk-bundle") exclude("org.elasticsearch", "elasticsearch-x-content") exclude("org.elasticsearch", "elasticsearch") exclude("org.apache.hadoop", "hadoop-common"),
"org.apache.hadoop" % "hadoop-common" % "3.3.6" exclude("org.apache.hadoop.thirdparty", "hadoop-shaded-protobuf_3_7") exclude("org.eclipse.jetty", "jetty-io") exclude("org.apache.zookeeper", "zookeeper") exclude("com.google.protobuf", "protobuf-java") exclude("org.apache.avro", "avro"), //needed for ranger 2.3.0 - if vulnerabilities are fixed remove this
"com.lightbend.akka" %% "akka-stream-alpakka-xml"% "3.0.4",
"io.dropwizard.metrics" % "metrics-core" % metricVersion,
"io.dropwizard.metrics" % "metrics-jmx" % metricVersion,
"com.auth0" % "java-jwt" % "4.3.0",
"com.github.cb372" %% "scalacache-core" % "0.28.0",
"com.github.cb372" %% "scalacache-caffeine" % "0.28.0",
"com.typesafe.akka" %% "akka-testkit" % akkaVersion % Test,
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % Test,
"org.scalatest" %% "scalatest" % "3.2.16" % "it,test",
"com.amazonaws" % "aws-java-sdk-sts" % "1.12.471" % IntegrationTest,
)
dependencyOverrides ++= Seq(
"net.minidev" % "json-smart" % "2.4.11",
"com.nimbusds" % "nimbus-jose-jwt" % "9.31",
"org.codehaus.jettison" % "jettison" % "1.5.4",
)
// Fix logging dependencies:
// - Our logging implementation is Logback, via the Slf4j API.
// - Therefore we suppress the Log4j implementation and re-route its API calls over Slf4j.
libraryDependencies += "org.slf4j" % "log4j-over-slf4j" % "2.0.7" % Runtime
excludeDependencies += "org.slf4j" % "slf4j-log4j12"
excludeDependencies += "log4j" % "log4j"
configs(IntegrationTest)
Defaults.itSettings
Test / parallelExecution:= true
IntegrationTest / parallelExecution := true
enablePlugins(JavaAppPackaging)
fork := true
// Some default options at runtime: the G1 garbage collector, and headless mode.
javaOptions += "-XX:+UseG1GC"
javaOptions += "-Djava.awt.headless=true"
javaOptions += "-Dlogback.configurationFile=/etc/rokku/logback.xml"
dockerExposedPorts := Seq(8987) // should match PROXY_PORT
dockerCommands += ExecCmd("ENV", "PROXY_HOST", "0.0.0.0")
dockerBaseImage := "eclipse-temurin:17-alpine"
dockerAlias := docker.DockerAlias(Some("docker.io"), Some("wbaa"), "rokku", Some(rokkuVersion))
scalariformPreferences := scalariformPreferences.value
.setPreference(AlignSingleLineCaseStatements, true)
.setPreference(DanglingCloseParenthesis, Preserve)
.setPreference(DoubleIndentConstructorArguments, true)
.setPreference(DoubleIndentMethodDeclaration, true)
.setPreference(NewlineAtEndOfFile, true)
.setPreference(SingleCasePatternOnNewline, false)
dockerChmodType := DockerChmodType.UserGroupWriteExecute
dockerCommands += ExecCmd("RUN", "mkdir", "-p", "/opt/docker/lib/plugins") //additional libs e.g. for authorization plugin
// hack for ranger conf dir - should contain files like ranger-s3-security.xml etc.
bashScriptDefines / scriptClasspath ~= (cp => cp :+ ":/etc/rokku"+ ":/opt/docker/lib/plugins/*")
//Coverage settings
Compile / coverageMinimum := 70
Compile / coverageFailOnMinimum := false
Compile / coverageHighlighting := true
Compile / coverageEnabled := true