Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make the server executable: #51 #66

Merged
merged 16 commits into from
Sep 21, 2023
8 changes: 5 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import Dependencies._
import SparkVersionAxis._
import JacocoSetup._
import sbt.Keys.name

ThisBuild / organization := "za.co.absa.atum-service"

Expand Down Expand Up @@ -70,7 +71,10 @@ lazy val atumServer = (projectMatrix in file("server"))
commonSettings ++ Seq(
name := "atum-server",
libraryDependencies ++= Dependencies.serverDependencies,
Compile / packageBin / publishArtifact := false,
(Compile / compile) := ((Compile / compile) dependsOn printScalaVersion).value,
packageBin := (Compile / assembly).value,
artifactPath / (Compile / packageBin) := baseDirectory.value / s"target/${name.value}-${version.value}.war",
webappWebInfClasses := true,
inheritJarManifest := true
): _*
Expand All @@ -79,10 +83,8 @@ lazy val atumServer = (projectMatrix in file("server"))
jacocoReportSettings := jacocoSettings( scalaVersion.value, "atum-server"),
jacocoExcludes := jacocoProjectExcludes()
)
.enablePlugins(AssemblyPlugin)
.enablePlugins(TomcatPlugin)
.enablePlugins(AutomateHeaderPlugin)
.jvmPlatform(scalaVersions = Seq(scala212))




9 changes: 4 additions & 5 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,29 +30,28 @@ object Dependencies {
}

def commonDependencies: Seq[ModuleID] = Seq(
"org.scalatest" %% "scalatest" % "3.2.2" % Test,
"org.scalatest" %% "scalatest" % "3.2.15" % Test,
"org.mockito" %% "mockito-scala" % "1.17.12" % Test
)

def serverDependencies: Seq[ModuleID] = {

val springVersion = "2.6.1"
val springOrg = "org.springframework.boot"

lazy val scalaTest = "org.scalatest" %% "scalatest" % "3.2.9"
lazy val scalaTest = "org.scalatest" %% "scalatest" % "3.2.15"
lazy val springBootWeb = springOrg % "spring-boot-starter-web" % springVersion
lazy val springBootConfiguration = springOrg % "spring-boot-configuration-processor" % springVersion
lazy val springBootTomcat = springOrg % "spring-boot-starter-tomcat" % springVersion
lazy val springBootTest = springOrg % "spring-boot-starter-test" % springVersion
lazy val servletApi = "javax.servlet" % "javax.servlet-api" % "3.0.1"
lazy val servletApi = "javax.servlet" % "javax.servlet-api" % "4.0.1"
lazy val springFoxSwagger = "io.springfox" % "springfox-swagger2" % "3.0.0"
lazy val springFoxBoot = "io.springfox" % "springfox-boot-starter" % "3.0.0"
lazy val springFoxSwaggerUI = "io.springfox" % "springfox-swagger-ui" % "3.0.0"

// controller implicits: java CompletableFuture -> scala Future
lazy val scalaJava8Compat = "org.scala-lang.modules" %% "scala-java8-compat" % "1.0.2"
// object mapper serialization
lazy val jacksonModuleScala = "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.13.1"
lazy val jacksonModuleScala = "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.14.2"


Seq(
Expand Down
3 changes: 3 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.9.1")
// To add release plugin
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")

// Plugins to build the server module as a war file
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10")

// sbt-jacoco dependency downloading
lazy val ow2Version = "9.5"
lazy val jacocoVersion = "0.8.11-absa.1"
Expand Down
Loading