forked from Dr-kyle/kafka-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
135 lines (105 loc) · 4.14 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
/**
* Copyright 2015 Yahoo Inc. Licensed under the Apache License, Version 2.0
* See accompanying LICENSE file.
*/
name := """kafka-manager"""
/* For packaging purposes, -SNAPSHOT MUST contain a digit */
version := "2.0.0.2"
scalaVersion := "2.12.8"
scalacOptions ++= Seq("-Xlint:-missing-interpolator","-Xfatal-warnings","-deprecation","-feature","-language:implicitConversions","-language:postfixOps","-Xmax-classfile-name","240")
// From https://www.playframework.com/documentation/2.3.x/ProductionDist
assemblyMergeStrategy in assembly := {
case "play/reference-overrides.conf" => MergeStrategy.first
case "logger.xml" => MergeStrategy.first
case "play/core/server/ServerWithStop.class" => MergeStrategy.first
case other => (assemblyMergeStrategy in assembly).value(other)
}
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-actor" % "2.5.19",
"com.typesafe.akka" %% "akka-slf4j" % "2.5.19",
"com.google.code.findbugs" % "jsr305" % "3.0.2",
"org.webjars" %% "webjars-play" % "2.6.3",
"org.webjars" % "bootstrap" % "4.3.1",
"org.webjars" % "jquery" % "3.3.1-2",
"org.webjars" % "backbonejs" % "1.3.3",
"org.webjars" % "underscorejs" % "1.9.0",
"org.webjars" % "dustjs-linkedin" % "2.7.2",
"org.webjars" % "octicons" % "4.3.0",
"org.apache.curator" % "curator-framework" % "2.12.0" exclude("log4j","log4j") exclude("org.slf4j", "slf4j-log4j12") force(),
"org.apache.curator" % "curator-recipes" % "2.12.0" exclude("log4j","log4j") exclude("org.slf4j", "slf4j-log4j12") force(),
"org.json4s" %% "json4s-jackson" % "3.6.5",
"org.json4s" %% "json4s-scalaz" % "3.6.5",
"org.slf4j" % "log4j-over-slf4j" % "1.7.25",
"com.adrianhurt" %% "play-bootstrap" % "1.4-P26-B4" exclude("com.typesafe.play", "*"),
"org.clapper" %% "grizzled-slf4j" % "1.3.3",
"org.apache.kafka" %% "kafka" % "2.2.0" exclude("log4j","log4j") exclude("org.slf4j", "slf4j-log4j12") force(),
"org.apache.kafka" % "kafka-streams" % "2.2.0",
"com.beachape" %% "enumeratum" % "1.5.13",
"com.github.ben-manes.caffeine" % "caffeine" % "2.6.2",
"com.typesafe.play" %% "play-logback" % "2.6.21",
"org.scalatest" %% "scalatest" % "3.0.5" % "test",
"org.scalatestplus.play" %% "scalatestplus-play" % "3.1.2" % "test",
"org.apache.curator" % "curator-test" % "2.12.0" % "test",
"org.mockito" % "mockito-core" % "1.10.19" % "test",
"com.yammer.metrics" % "metrics-core" % "2.2.0" force(),
"com.unboundid" % "unboundid-ldapsdk" % "4.0.9"
)
routesGenerator := InjectedRoutesGenerator
LessKeys.compress in Assets := true
pipelineStages := Seq(digest, gzip)
includeFilter in (Assets, LessKeys.less) := "*.less"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
coverageExcludedPackages := "<empty>;controllers.*;views.*;models.*"
/*
* Allow packaging as part of the build
*/
enablePlugins(SbtNativePackager)
/*
* Enable systemd as systemloader
*/
enablePlugins(SystemdPlugin)
enablePlugins(sbtdocker.DockerPlugin)
dockerfile in docker := {
val zipFile: File = dist.value
new Dockerfile {
from("openjdk:8-jre-slim")
add(zipFile, file("/opt/kafka-manager.zip"))
workDir("/opt")
run("unzip", "kafka-manager.zip")
run("rm", "-f", "kafka-manager.zip")
expose(9000)
cmd(s"kafka-manager-${version.value}/bin/kafka-manager")
}
}
imageNames in docker := Seq(
ImageName(
s"${name.value}:${version.value}"
)
)
buildOptions in docker := BuildOptions(
pullBaseImage = BuildOptions.Pull.Always
)
/*
* Start service as user root
*/
daemonUser in Linux := "root"
/* Debian Settings - to create, run as:
$ sbt debian:packageBin
See here for details:
http://www.scala-sbt.org/sbt-native-packager/formats/debian.html
*/
maintainer := "Yahoo <[email protected]>"
packageSummary := "A tool for managing Apache Kafka"
packageDescription := "A tool for managing Apache Kafka"
/* End Debian Settings */
/* RPM Settings - to create, run as:
$ sbt rpm:packageBin
See here for details:
http://www.scala-sbt.org/sbt-native-packager/formats/rpm.html
*/
rpmRelease := "1"
rpmVendor := "yahoo"
rpmUrl := Some("https://github.com/yahoo/kafka-manager")
rpmLicense := Some("Apache")
rpmGroup := Some("kafka-manager")
/* End RPM Settings */