From 8afce36ae25821c64038660275e4061af0a040e2 Mon Sep 17 00:00:00 2001 From: Pavel Salamon Date: Tue, 13 Feb 2024 16:12:26 +0100 Subject: [PATCH] json serde etc --- build.sbt | 6 ++---- project/Dependencies.scala | 2 +- project/plugins.sbt | 2 +- server/README.md | 5 +++-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/build.sbt b/build.sbt index bc57efb14..b3edec56c 100644 --- a/build.sbt +++ b/build.sbt @@ -18,8 +18,6 @@ import Dependencies._ import JacocoSetup._ import sbt.Keys.name -import scala.collection.immutable.Seq - ThisBuild / organization := "za.co.absa.atum-service" sonatypeProfileName := "za.co.absa" @@ -90,7 +88,7 @@ lazy val agent = (projectMatrix in file("agent")) commonSettings ++ Seq( name := "atum-agent", javacOptions ++= Seq("-source", "1.8", "-target", "1.8", "-Xlint"), - libraryDependencies ++= commonDependencies ++ testDependencies ++ Dependencies.agentDependencies( + libraryDependencies ++= jsonSerdeDependencies ++ testDependencies ++ Dependencies.agentDependencies( if (scalaVersion.value == Versions.scala211) Versions.spark2 else Versions.spark3, scalaVersion.value ), @@ -111,7 +109,7 @@ lazy val model = (projectMatrix in file("model")) commonSettings ++ Seq( name := "atum-model", javacOptions ++= Seq("-source", "1.8", "-target", "1.8", "-Xlint"), - libraryDependencies ++= commonDependencies ++ testDependencies ++ Dependencies.modelDependencies(scalaVersion.value), + libraryDependencies ++= jsonSerdeDependencies ++ testDependencies ++ Dependencies.modelDependencies(scalaVersion.value), printScalaVersion := { val log = streams.value.log log.info(s"Building ${name.value} with Scala ${scalaVersion.value}") diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 38f860ae9..f8b8541e9 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -110,7 +110,7 @@ object Dependencies { ) } - def commonDependencies: Seq[ModuleID] = { + def jsonSerdeDependencies: Seq[ModuleID] = { val json4sVersion = json4sVersionForScala(Versions.scala212) lazy val jacksonModuleScala = "com.fasterxml.jackson.module" %% "jackson-module-scala" % Versions.jacksonModuleScala diff --git a/project/plugins.sbt b/project/plugins.sbt index 3a360d5fd..321d068ee 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -26,7 +26,7 @@ addSbtPlugin("io.github.davidmweber" % "flyway-sbt" % "7.4.0") // To add release plugin addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") -// Plugins to build the server module as a war file +// Plugins to build the server module as a jar file addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10") // sbt-jacoco dependency downloading diff --git a/server/README.md b/server/README.md index 7ee745bd9..551854cd8 100644 --- a/server/README.md +++ b/server/README.md @@ -2,10 +2,11 @@ ## How to build and run (will be updated soon) -To create a war file that can be deployed to tomcat just run: +To create a jar file that can be executed: ```shell -> sbt package +> sbt clean "project server" assembly +> java -jar server/target/jvm-2.13/*.jar ``` If you want to quickly build and run from sbt you can run using the command below (alternatively you can execute za.co.absa.atum.server.Main within your IDE). This deploys it to `localhost:8080`.