Skip to content
Permalink
Browse files
build: inventory and upgrade of dependencies (DEV-478) (#2033)
* remove unused deps + sort

* a bit more cleanup

* add deps Scala 3 in- or compatibility info

* upgrade most deps

* bring back rdf4j-client and rdf4j-shacl to v3.4.4

* menage sbt plugins

* plugins
  • Loading branch information
mpro7 committed Apr 5, 2022
1 parent b07600d commit 470b77fb8b6e7b0c37392414fe96f4864231e3d0
Showing with 65 additions and 145 deletions.
  1. +1 −1 build.sbt
  2. +57 −139 project/Dependencies.scala
  3. +7 −5 project/plugins.sbt
@@ -137,7 +137,7 @@ lazy val webapi: Project = Project(id = "webapi", base = file("webapi"))
"-javaagent:" + resolved.artifact.absolutePath + resolved.agent.arguments
}, // allows sbt-javaagent to work with sbt-revolver
reStart / javaOptions ++= webapiJavaRunOptions,
javaAgents += Dependencies.aspectJWeaver,
javaAgents += Dependencies.aspectjweaver,
fork := true, // run tests in a forked JVM
Test / testForkedParallel := false, // run forked tests in parallel
Test / parallelExecution := false, // run non-forked tests in parallel
@@ -9,223 +9,141 @@ import sbt.Keys._
import sbt.{Def, _}

object Dependencies {
// core deps versions
val scalaVersion = "2.13.7"
val akkaVersion = "2.6.18"
val akkaHttpVersion = "10.2.8"
// versions
val akkaHttpVersion = "10.2.9"
val akkaVersion = "2.6.19"
val fusekiImage = "daschswiss/apache-jena-fuseki:2.0.8" // should be the same version as in docker-compose.yml
val jenaVersion = "4.4.0"
val metricsVersion = "4.0.1"
val scalaVersion = "2.13.8"
val sipiImage = "daschswiss/sipi:3.3.4" // base image the knora-sipi image is created from
val fusekiImage = "daschswiss/apache-jena-fuseki:2.0.8" // should be the same version as in docker-compose.yml

// ZIO
val ZioVersion = "2.0.0-RC2"
val ZioHttpVersion = "2.0.0-RC3"
val ZioPreludeVersion = "1.0.0-RC10"
val ZioVersion = "2.0.0-RC2"

// ZIO - all Scala 3 compatible
val zio = "dev.zio" %% "zio" % ZioVersion
val zioHttp = "io.d11" %% "zhttp" % ZioHttpVersion
val zioPrelude = "dev.zio" %% "zio-prelude" % ZioPreludeVersion
val zioTest = "dev.zio" %% "zio-test" % ZioVersion
val zioTestSbt = "dev.zio" %% "zio-test-sbt" % ZioVersion
val izumiReflect = "dev.zio" %% "izumi-reflect" % "2.0.8"
val zioStacktracer = "dev.zio" %% "zio-stacktracer" % ZioVersion

// akka
val akkaActor = "com.typesafe.akka" %% "akka-actor" % akkaVersion
val akkaStream = "com.typesafe.akka" %% "akka-stream" % akkaVersion
val akkaSlf4j = "com.typesafe.akka" %% "akka-slf4j" % akkaVersion
val akkaHttp = "com.typesafe.akka" %% "akka-http" % akkaHttpVersion
val akkaHttpSprayJson = "com.typesafe.akka" %% "akka-http-spray-json" % akkaHttpVersion

//CORS support
val akkaHttpCors = "ch.megard" %% "akka-http-cors" % "1.0.0"
val akkaActor = "com.typesafe.akka" %% "akka-actor" % akkaVersion // Scala 3 compatible
val akkaHttp = "com.typesafe.akka" %% "akka-http" % akkaHttpVersion // Scala 3 incompatible
val akkaHttpCors = "ch.megard" %% "akka-http-cors" % "1.0.0" // Scala 3 incompatible
val akkaHttpSprayJson = "com.typesafe.akka" %% "akka-http-spray-json" % akkaHttpVersion // Scala 3 incompatible
val akkaSlf4j = "com.typesafe.akka" %% "akka-slf4j" % akkaVersion // Scala 3 compatible
val akkaStream = "com.typesafe.akka" %% "akka-stream" % akkaVersion // Scala 3 compatible

// jena
val jenaText = "org.apache.jena" % "jena-text" % jenaVersion

// logging
val scalaLogging = "com.typesafe.scala-logging" %% "scala-logging" % "3.9.4"
val logbackClassic = "ch.qos.logback" % "logback-classic" % "1.2.10"
val logbackClassic = "ch.qos.logback" % "logback-classic" % "1.2.11"
val scalaLogging = "com.typesafe.scala-logging" %% "scala-logging" % "3.9.4" // Scala 3 compatible

// Metrics
val kamonCore = "io.kamon" %% "kamon-core" % "2.1.5"
val kamonScalaFuture = "io.kamon" %% "kamon-scala-future" % "2.1.5"
val kamonAkkaHttpd = "io.kamon" %% "kamon-akka-http" % "2.1.5"
val aspectJWeaver = "org.aspectj" % "aspectjweaver" % "1.9.4"
val aspectjweaver = "org.aspectj" % "aspectjweaver" % "1.9.4"
val kamonCore = "io.kamon" %% "kamon-core" % "2.5.0" // Scala 3 compatible
val kamonScalaFuture = "io.kamon" %% "kamon-scala-future" % "2.1.5" // Scala 3 incompatible

// input validation
val commonsValidator =
"commons-validator" % "commons-validator" % "1.6" exclude ("commons-logging", "commons-logging")
"commons-validator" % "commons-validator" % "1.7" exclude ("commons-logging", "commons-logging")

// authentication
val jwtSprayJson = "com.pauldijou" %% "jwt-spray-json" % "5.0.0" // Scala 3 incompatible
val springSecurityCore =
"org.springframework.security" % "spring-security-core" % "5.1.5.RELEASE" exclude ("commons-logging", "commons-logging") exclude ("org.springframework", "spring-aop")
val jwtSprayJson = "com.pauldijou" %% "jwt-spray-json" % "5.0.0"
"org.springframework.security" % "spring-security-core" % "5.6.2" exclude ("commons-logging", "commons-logging") exclude ("org.springframework", "spring-aop")

// caching
val ehcache = "net.sf.ehcache" % "ehcache" % "2.10.9.2"
val jedis = "redis.clients" % "jedis" % "3.1.0-m4"
val jedis = "redis.clients" % "jedis" % "4.2.1"

// serialization
val chill = "com.twitter" %% "chill" % "0.9.5"
val chill = "com.twitter" %% "chill" % "0.10.0" // Scala 3 incompatible

// other
val jodd = "org.jodd" % "jodd" % "3.2.6"
val diff = "com.sksamuel.diff" % "diff" % "1.1.11"
val xmlunitCore = "org.xmlunit" % "xmlunit-core" % "2.1.1"
val gwtServlet = "com.google.gwt" % "gwt-servlet" % "2.9.0"
val icu4j = "com.ibm.icu" % "icu4j" % "70.1"
val jakartaJSON = "org.glassfish" % "jakarta.json" % "2.0.1"
val jodd = "org.jodd" % "jodd" % "3.2.6"
val rdf4jClient = "org.eclipse.rdf4j" % "rdf4j-client" % "3.4.4"
val scallop = "org.rogach" %% "scallop" % "3.5.1"
val gwtServlet = "com.google.gwt" % "gwt-servlet" % "2.8.0"
val saxonHE = "net.sf.saxon" % "Saxon-HE" % "9.9.0-2"
val icu4j = "com.ibm.icu" % "icu4j" % "62.1"

// swagger (api documentation)
val swaggerAkkaHttp = "com.github.swagger-akka-http" %% "swagger-akka-http" % "1.6.0"

// Graph for Scala
val scalaGraph = "org.scala-graph" %% "graph-core" % "1.13.1"

// test
val akkaTestkit = "com.typesafe.akka" %% "akka-testkit" % akkaVersion
val akkaStreamTestkit = "com.typesafe.akka" %% "akka-stream-testkit" % akkaVersion
val akkaHttpTestkit = "com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion
val scalaTest = "org.scalatest" %% "scalatest" % "3.2.2"
val gatlingHighcharts = "io.gatling.highcharts" % "gatling-charts-highcharts" % "3.7.5"
val gatlingTestFramework = "io.gatling" % "gatling-test-framework" % "3.2.1"
val testcontainers = "org.testcontainers" % "testcontainers" % "1.16.0"

// missing from current BAZEL setup
val rdf4jShacl = "org.eclipse.rdf4j" % "rdf4j-shacl" % "3.4.4"
val saxonHE = "net.sf.saxon" % "Saxon-HE" % "11.3"
val scalaGraph = "org.scala-graph" %% "graph-core" % "1.13.1" // Scala 3 incompatible
val scallop = "org.rogach" %% "scallop" % "4.1.0" // Scala 3 compatible
val swaggerAkkaHttp = "com.github.swagger-akka-http" %% "swagger-akka-http" % "1.6.0" // Scala 3 incompatible
val titaniumJSONLD = "com.apicatalog" % "titanium-json-ld" % "1.2.0"
val jakartaJSON = "org.glassfish" % "jakarta.json" % "2.0.1"
val xmlunitCore = "org.xmlunit" % "xmlunit-core" % "2.9.0"

// found by plugin
val jwtCore = "com.pauldijou" %% "jwt-core" % "5.0.0"
val config = "com.typesafe" % "config" % "1.4.0"
val akkaHttpCore = "com.typesafe.akka" %% "akka-http-core" % "10.2.8"
val commonsIo = "commons-io" % "commons-io" % "2.11.0"
val sprayJson = "io.spray" %% "spray-json" % "1.3.6"
val swaggerAnnotations = "io.swagger" % "swagger-annotations" % "1.6.3"
val swaggerModels = "io.swagger" % "swagger-models" % "1.6.3"
val jsr311Api = "javax.ws.rs" % "jsr311-api" % "1.1.1"
val commonsLang3 = "org.apache.commons" % "commons-lang3" % "3.12.0"
val commonsPool2 = "org.apache.commons" % "commons-pool2" % "2.6.2"
val commonsText = "org.apache.commons" % "commons-text" % "1.8"
val httpClient =
"org.apache.httpcomponents" % "httpclient" % "4.5.13" exclude ("commons-logging", "commons-logging")
val httpCore = "org.apache.httpcomponents" % "httpcore" % "4.4.14"
val jenaArq = "org.apache.jena" % "jena-arq" % "4.4.0"
val jenaCore = "org.apache.jena" % "jena-core" % "4.4.0"
val jenaShacl = "org.apache.jena" % "jena-shacl" % "4.4.0"
val jenaTdb = "org.apache.jena" % "jena-tdb" % "4.4.0"
val luceneCore = "org.apache.lucene" % "lucene-core" % "8.11.1"
val rdf4jModel = "org.eclipse.rdf4j" % "rdf4j-model" % "3.4.4"
val rdf4jQuery = "org.eclipse.rdf4j" % "rdf4j-query" % "3.4.4"
val rdf4jQueryAlgebraModel = "org.eclipse.rdf4j" % "rdf4j-queryalgebra-model" % "3.4.4"
val rdf4jQueryParserApi = "org.eclipse.rdf4j" % "rdf4j-queryparser-api" % "3.4.4"
val rdf4jQueryParserSparql = "org.eclipse.rdf4j" % "rdf4j-queryparser-sparql" % "3.4.4"
val rdf4jRepositoryApi = "org.eclipse.rdf4j" % "rdf4j-repository-api" % "3.4.4"
val rdf4jRepositorySail = "org.eclipse.rdf4j" % "rdf4j-repository-sail" % "3.4.4"
val rdf4jRioApi = "org.eclipse.rdf4j" % "rdf4j-rio-api" % "3.4.4"
val rdf4jSailApi = "org.eclipse.rdf4j" % "rdf4j-sail-api" % "3.4.4"
val rdf4jSailMemory = "org.eclipse.rdf4j" % "rdf4j-sail-memory" % "3.4.4"
val rdf4jShacl = "org.eclipse.rdf4j" % "rdf4j-shacl" % "3.4.4"
val rdf4jUtil = "org.eclipse.rdf4j" % "rdf4j-util" % "3.4.4"
val scalaReflect = "org.scala-lang" % "scala-reflect" % "2.13.7"
val scalaXml = "org.scala-lang.modules" %% "scala-xml" % "1.3.0"
val slf4jApi = "org.slf4j" % "slf4j-api" % "1.7.35"
// test
val akkaHttpTestkit = "com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion // Scala 3 incompatible
val akkaStreamTestkit = "com.typesafe.akka" %% "akka-stream-testkit" % akkaVersion // Scala 3 compatible
val akkaTestkit = "com.typesafe.akka" %% "akka-testkit" % akkaVersion // Scala 3 compatible
val gatlingHighcharts = "io.gatling.highcharts" % "gatling-charts-highcharts" % "3.7.6"
val gatlingTestFramework = "io.gatling" % "gatling-test-framework" % "3.7.6"
val scalaTest = "org.scalatest" %% "scalatest" % "3.2.2" // Scala 3 compatible
val testcontainers = "org.testcontainers" % "testcontainers" % "1.16.3"

val webapiLibraryDependencies = Seq(
akkaActor,
akkaHttp,
akkaHttpCors,
akkaHttpSprayJson,
akkaHttpTestkit % Test,
akkaSlf4j % Runtime,
akkaStream,
akkaStreamTestkit % Test,
akkaTestkit % Test,
chill,
commonsValidator,
diff,
ehcache,
gatlingHighcharts % Test,
gatlingTestFramework % Test,
gwtServlet,
icu4j,
jakartaJSON,
jedis,
jenaText,
jodd,
jwtSprayJson,
kamonCore,
kamonScalaFuture,
logbackClassic % Runtime,
rdf4jClient % Test,
rdf4jShacl,
saxonHE,
scalaGraph,
scalaLogging,
logbackClassic % Runtime,
scalaTest % Test,
scallop,
springSecurityCore,
swaggerAkkaHttp,
titaniumJSONLD,
akkaHttpTestkit % Test,
akkaStreamTestkit % Test,
akkaTestkit % Test,
gatlingHighcharts % Test,
gatlingTestFramework % Test,
scalaTest % Test,
testcontainers % Test,
titaniumJSONLD,
xmlunitCore % Test,
zio,
zioPrelude,
zioTest % Test,
zioTestSbt % Test,
jakartaJSON,
rdf4jClient % Test,
// found by plugin - to check if are actually needed
// jwtCore,
// config,
// akkaHttpCore,
// commonsIo,//
// sprayJson,
// swaggerAnnotations,
// swaggerModels,
// jsr311Api,
// commonsLang3,
// commonsPool2,
// commonsText,//
// httpClient,//
// httpCore,
// jenaArq,
// jenaCore,
// jenaShacl,
// jenaTdb,
// luceneCore,
// rdf4jModel,
// rdf4jQuery,
// rdf4jQueryAlgebraModel,
// rdf4jQueryParserApi,
// rdf4jQueryParserSparql,
// rdf4jRepositoryApi,
// rdf4jRepositorySail,
// rdf4jRioApi,
// rdf4jSailApi,
// rdf4jSailMemory,
rdf4jShacl,
// rdf4jUtil,
// scalaReflect,
// scalaXml,//
// slf4jApi
zioTestSbt % Test
)

val dspApiMainLibraryDependencies = Seq(
zio,
// compile w/o both but plugin complain missing them
izumiReflect,
zioStacktracer
zio
)

val schemaApiLibraryDependencies = Seq(
zioHttp
)

val schemaCoreLibraryDependencies = Seq(
zioPrelude
)

val schemaRepoLibraryDependencies = Seq()
val schemaRepoEventStoreServiceLibraryDependencies = Seq()
val schemaRepoSearchServiceLibraryDependencies = Seq()
@@ -2,24 +2,26 @@ resolvers ++= Seq(
Resolver.typesafeRepo("releases")
)

// please don't remove or merge uncommented to main
addDependencyTreePlugin

// Knora
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.2")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.4")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.9")
addSbtPlugin("io.kamon" % "sbt-aspectj-runner" % "1.1.1")

// webapi
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.5.1")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10")

addSbtPlugin("com.lightbend.sbt" % "sbt-javaagent" % "0.1.5")
addSbtPlugin("io.gatling" % "gatling-sbt" % "2.2.2")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")
addSbtPlugin("com.codacy" % "sbt-codacy-coverage" % "1.3.15")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")

// ad-hoc plugins - uncomment on demenad and keep it commented out in main branch
// https://github.com/rtimush/sbt-updates
// addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.1")
// https://github.com/cb372/sbt-explicit-dependencies
// addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16")

// please don't remove or merge uncommented to main
// addDependencyTreePlugin

0 comments on commit 470b77f

Please sign in to comment.