Skip to content
Permalink
Browse files
build: distinguish between compile, runtime and test dependencies (#2028
)

* add missing dependencies

* add sbt cancelation setting

* remove unused and doubled stuff

* remove suggested by the plugin deps unused during compile time

* manage runtime deps

* hide recently added deps suggested by plugin

* bring back rdf4jClient

* PR2018 fix

* simplify deps structure

* add project specific deps containers

Co-authored-by: Ivan Subotic <400790+subotic@users.noreply.github.com>
  • Loading branch information
mpro7 and subotic committed Mar 31, 2022
1 parent 8a30894 commit 7cb326ff5804b46995d25ce301a17c153af93036
Showing with 189 additions and 213 deletions.
  1. +11 −12 build.sbt
  2. +1 −1 docs/02-knora-ontologies/knora-base.md
  3. +177 −200 project/Dependencies.scala
@@ -15,6 +15,9 @@ import scala.sys.process.Process
// GLOBAL SETTINGS
//////////////////////////////////////

// when true enables run cancellation w/o exiting sbt
cancelable in Global := true

lazy val aggregatedProjects: Seq[ProjectReference] = Seq(webapi, sipi)

lazy val buildSettings = Seq(
@@ -93,10 +96,6 @@ lazy val webApiCommonSettings = Seq(
name := "webapi"
)

// GatlingPlugin - load testing
// JavaAgent - adds AspectJ Weaver configuration
// BuildInfoPlugin - allows generation of scala code with version information

lazy val webapi: Project = Project(id = "webapi", base = file("webapi"))
.settings(buildSettings)
.enablePlugins(SbtTwirl, JavaAppPackaging, DockerPlugin, GatlingPlugin, JavaAgent, RevolverPlugin, BuildInfoPlugin)
@@ -105,7 +104,7 @@ lazy val webapi: Project = Project(id = "webapi", base = file("webapi"))
resolvers ++= Seq(
Resolver.bintrayRepo("hseeberger", "maven")
),
Dependencies.webapiLibraryDependencies
libraryDependencies ++= Dependencies.webapiLibraryDependencies
)
.settings(
inConfig(Test)(Defaults.testTasks ++ baseAssemblySettings)
@@ -138,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.Compile.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
@@ -224,7 +223,7 @@ lazy val apiMain = project
.in(file("dsp-api-main"))
.settings(
name := "dsp-api-main",
Dependencies.webapiLibraryDependencies,
libraryDependencies ++= Dependencies.dspApiMainLibraryDependencies,
testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework"))
)
.dependsOn(schemaCore, schemaRepo, schemaApi)
@@ -233,7 +232,7 @@ lazy val schemaApi = project
.in(file("dsp-schema/api"))
.settings(
name := "schemaApi",
Dependencies.webapiLibraryDependencies,
libraryDependencies ++= Dependencies.schemaApiLibraryDependencies,
testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework"))
)
.dependsOn(schemaCore)
@@ -242,15 +241,15 @@ lazy val schemaCore = project
.in(file("dsp-schema/core"))
.settings(
name := "schemaCore",
Dependencies.webapiLibraryDependencies,
libraryDependencies ++= Dependencies.schemaCoreLibraryDependencies,
testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework"))
)

lazy val schemaRepo = project
.in(file("dsp-schema/repo"))
.settings(
name := "schemaRepo",
Dependencies.webapiLibraryDependencies,
libraryDependencies ++= Dependencies.schemaRepoLibraryDependencies,
testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework"))
)
.dependsOn(schemaCore)
@@ -259,7 +258,7 @@ lazy val schemaRepoEventStoreService = project
.in(file("dsp-schema/repo-eventstore-service"))
.settings(
name := "schemaRepoEventstoreService",
Dependencies.webapiLibraryDependencies,
libraryDependencies ++= Dependencies.schemaRepoEventStoreServiceLibraryDependencies,
testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework"))
)
.dependsOn(schemaRepo)
@@ -268,7 +267,7 @@ lazy val schemaRepoSearchService = project
.in(file("dsp-schema/repo-search-service"))
.settings(
name := "dsp-schema-repo-search-service",
Dependencies.webapiLibraryDependencies,
libraryDependencies ++= Dependencies.schemaRepoSearchServiceLibraryDependencies,
testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework"))
)
.dependsOn(schemaRepo)
@@ -50,7 +50,7 @@ the `kb:isInProject` property, as described in
### Ontologies

Each user-created ontology must be defined as an `owl:Ontology` with the properties `rdfs:label` and `kb:attachedToProject`.
Since [DSP-API v19](https://github.com/dasch-swiss/dsp-api/releases/tag/v19.0.0) `kb:lastModificationDate` property is also required.
Since [DSP-API v20](https://github.com/dasch-swiss/dsp-api/releases/tag/v20.0.0) `kb:lastModificationDate` property is also required.

### Resources

0 comments on commit 7cb326f

Please sign in to comment.