Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated the build configuration to use sbt-nexus-workbench (#18)
Removed unnecessary workbench module as the sources are now inherited from the workbench dependency. Updated context files such that the `@context` value is now boxed in a json document under the `@context` key. This addresses the lack of compliance with the json-ld spec.
- Loading branch information
1 parent
db2080a
commit 64811f9
Showing
13 changed files
with
156 additions
and
606 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,25 @@ | ||
lazy val commonsVersion = "0.4.3" | ||
lazy val scalaTestVersion = "3.0.4" | ||
lazy val akkaHttpVersion = "10.0.10" | ||
|
||
lazy val shaclValidator = "ch.epfl.bluebrain.nexus" %% "shacl-validator" % commonsVersion | ||
lazy val akkaHttpCore = "com.typesafe.akka" %% "akka-http-core" % akkaHttpVersion | ||
lazy val scalaTest = "org.scalatest" %% "scalatest" % scalaTestVersion | ||
|
||
val baseUri = "http://localhost/v0" | ||
|
||
lazy val workbench = project | ||
.in(file("modules/workbench")) | ||
.settings(commonSettings, noPublishSettings) | ||
.settings(name := "schema-workbench", | ||
moduleName := "schema-workbench", | ||
libraryDependencies ++= Seq(shaclValidator, akkaHttpCore, scalaTest)) | ||
|
||
lazy val prov = project | ||
.in(file("modules/prov")) | ||
.enablePlugins(BuildInfoPlugin) | ||
.dependsOn(workbench % Test) | ||
.settings(commonSettings, buildInfoSettings) | ||
.settings(name := "nexus-prov", moduleName := "nexus-prov", libraryDependencies ++= Seq(scalaTest % Test)) | ||
.enablePlugins(WorkbenchPlugin) | ||
.disablePlugins(ScapegoatSbtPlugin) | ||
.settings( | ||
name := "nexus-prov", | ||
moduleName := "nexus-prov", | ||
resolvers += Resolver.bintrayRepo("bogdanromanx", "maven"), | ||
autoScalaLibrary := false, | ||
workbenchVersion := "0.1.3" | ||
) | ||
|
||
lazy val root = project | ||
.in(file(".")) | ||
.settings(name := "nexus-prov-root", moduleName := "nexus-prov-root") | ||
.settings(commonSettings, noPublishSettings) | ||
.aggregate(workbench, prov) | ||
.settings(noPublish) | ||
.aggregate(prov) | ||
|
||
lazy val buildInfoSettings = Seq( | ||
buildInfoKeys := Seq[BuildInfoKey]( | ||
BuildInfoKey("base" -> baseUri), | ||
BuildInfoKey.map(resources.in(Compile)) { | ||
case (_, v) => | ||
val resourceBase = resourceDirectory.in(Compile).value.getAbsolutePath | ||
val dirsWithJson = (v * "schemas" ** "*.json").get | ||
val schemas = dirsWithJson.map(_.getAbsolutePath.substring(resourceBase.length)) | ||
"schemas" -> schemas | ||
}, | ||
BuildInfoKey.map(resources.in(Compile)) { | ||
case (_, v) => | ||
val resourceBase = resourceDirectory.in(Compile).value.getAbsolutePath | ||
val dirsWithJson = (v * "contexts" ** "*.json").get | ||
val contexts = dirsWithJson.map(_.getAbsolutePath.substring(resourceBase.length)) | ||
"contexts" -> contexts | ||
}, | ||
BuildInfoKey.map(resources.in(Test)) { | ||
case (_, v) => | ||
val resourceBase = resourceDirectory.in(Test).value.getAbsolutePath | ||
val dirsWithJson = (v * "data" ** "*.json").get | ||
val data = dirsWithJson.map(_.getAbsolutePath.substring(resourceBase.length)) | ||
"data" -> data | ||
}, | ||
BuildInfoKey.map(resources.in(Test)) { | ||
case (_, v) => | ||
val resourceBase = resourceDirectory.in(Test).value.getAbsolutePath | ||
val dirsWithJson = (v * "invalid" ** "*.json").get | ||
val invalid = dirsWithJson.map(_.getAbsolutePath.substring(resourceBase.length)) | ||
"invalid" -> invalid | ||
} | ||
), | ||
buildInfoPackage := "ch.epfl.bluebrain.nexus.prov" | ||
lazy val noPublish = Seq( | ||
publishLocal := {}, | ||
publish := {}, | ||
publishArtifact := false | ||
) | ||
|
||
lazy val commonSettings = Seq(resolvers += Resolver.bintrayRepo("bogdanromanx", "maven")) | ||
|
||
lazy val noPublishSettings = Seq(publishLocal := {}, publish := {}, publishArtifact := false) | ||
|
||
def nexusDep(name: String, version: String): ModuleID = | ||
"ch.epfl.bluebrain.nexus" %% name % version | ||
|
||
addCommandAlias("review", ";clean;test") | ||
addCommandAlias("rel", ";release with-defaults skip-tests") |
32 changes: 17 additions & 15 deletions
32
modules/prov/src/main/resources/contexts/nexus/core/standards/v0.1.0.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
{ | ||
"skos": "http://www.w3.org/2004/02/skos/core#", | ||
"label": { | ||
"@id": "rdfs:label", | ||
"@type": "xsd:string" | ||
}, | ||
"comment": { | ||
"@id": "rdfs:comment", | ||
"@type": "xsd:string" | ||
}, | ||
"editorialNote": { | ||
"@id": "skos:editorialNote", | ||
"@type": "xsd:string" | ||
}, | ||
"schema": "http://schema.org/", | ||
"prov": "http://www.w3.org/ns/prov#" | ||
"@context": { | ||
"skos": "http://www.w3.org/2004/02/skos/core#", | ||
"label": { | ||
"@id": "rdfs:label", | ||
"@type": "xsd:string" | ||
}, | ||
"comment": { | ||
"@id": "rdfs:comment", | ||
"@type": "xsd:string" | ||
}, | ||
"editorialNote": { | ||
"@id": "skos:editorialNote", | ||
"@type": "xsd:string" | ||
}, | ||
"schema": "http://schema.org/", | ||
"prov": "http://www.w3.org/ns/prov#" | ||
} | ||
} |
242 changes: 122 additions & 120 deletions
242
modules/prov/src/main/resources/contexts/nexus/shacl/rec-shacl-20170720/v0.1.0.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,122 +1,124 @@ | ||
{ | ||
"sh": "http://www.w3.org/ns/shacl#", | ||
"class": { | ||
"@id": "sh:class", | ||
"@type": "@id" | ||
}, | ||
"rootClass": { | ||
"@id": "shext:rootClass", | ||
"@type": "@id" | ||
}, | ||
"path": { | ||
"@id": "sh:path", | ||
"@type": "@id" | ||
}, | ||
"qualifiedValueShape": { | ||
"@id": "sh:qualifiedValueShape", | ||
"@type": "@id", | ||
"@container": "@list" | ||
}, | ||
"qualifiedValueShapesDisjoint": { | ||
"@id": "sh:qualifiedValueShapesDisjoint", | ||
"@type": "xsd:boolean" | ||
}, | ||
"qualifiedMinCount": { | ||
"@id": "sh:qualifiedMinCount", | ||
"@type": "xsd:integer" | ||
}, | ||
"qualifiedMaxCount": { | ||
"@id": "sh:qualifiedMaxCount", | ||
"@type": "xsd:integer" | ||
}, | ||
"maxCount": { | ||
"@id": "sh:maxCount", | ||
"@type": "xsd:integer" | ||
}, | ||
"minCount": { | ||
"@id": "sh:minCount", | ||
"@type": "xsd:integer" | ||
}, | ||
"minInclusive": "sh:minInclusive", | ||
"maxInclusive": "sh:maxInclusive", | ||
"maxExclusive": "sh:maxExclusive", | ||
"minExclusive": "sh:minExclusive", | ||
"in": { | ||
"@id": "sh:in", | ||
"@container": "@list" | ||
}, | ||
"imports": { | ||
"@id": "owl:imports", | ||
"@type": "@id", | ||
"@container": "@set" | ||
}, | ||
"datatype": { | ||
"@id": "sh:datatype", | ||
"@type": "@id" | ||
}, | ||
"description": "sh:description", | ||
"name": "sh:name", | ||
"nodeKind": { | ||
"@id": "sh:nodeKind", | ||
"@type": "@id" | ||
}, | ||
"node": { | ||
"@id": "sh:node", | ||
"@type": "@id" | ||
}, | ||
"property": { | ||
"@id": "sh:property", | ||
"@type": "@id", | ||
"@container": "@set" | ||
}, | ||
"targetClass": { | ||
"@id": "sh:targetClass", | ||
"@type": "@id" | ||
}, | ||
"targetObjectsOf": { | ||
"@id": "sh:targetObjectsOf", | ||
"@type": "@id" | ||
}, | ||
"targetSubjectsOf": { | ||
"@id": "sh:targetSubjectsOf", | ||
"@type": "@id" | ||
}, | ||
"isDefinedBy": { | ||
"@id": "http://www.w3.org/2000/01/rdf-schema#isDefinedBy", | ||
"@type": "@id" | ||
}, | ||
"shapes": { | ||
"@reverse": "http://www.w3.org/2000/01/rdf-schema#isDefinedBy", | ||
"@type": "@id", | ||
"@container": "@set" | ||
}, | ||
"or": { | ||
"@id": "sh:or", | ||
"@type": "@id", | ||
"@container": "@list" | ||
}, | ||
"and": { | ||
"@id": "sh:and", | ||
"@type": "@id", | ||
"@container": "@list" | ||
}, | ||
"xone": { | ||
"@id": "sh:xone", | ||
"@type": "@id", | ||
"@container": "@list" | ||
}, | ||
"not": { | ||
"@id": "sh:not", | ||
"@type": "@id", | ||
"@container": "@list" | ||
}, | ||
"lessThan": { | ||
"@id": "sh:lessThan", | ||
"@type": "@id" | ||
}, | ||
"hasValue": "sh:hasValue", | ||
"owl": "http://www.w3.org/2002/07/owl#", | ||
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", | ||
"rdfs": "http://www.w3.org/2000/01/rdf-schema#", | ||
"xsd": "http://www.w3.org/2001/XMLSchema#" | ||
"@context": { | ||
"sh": "http://www.w3.org/ns/shacl#", | ||
"class": { | ||
"@id": "sh:class", | ||
"@type": "@id" | ||
}, | ||
"rootClass": { | ||
"@id": "shext:rootClass", | ||
"@type": "@id" | ||
}, | ||
"path": { | ||
"@id": "sh:path", | ||
"@type": "@id" | ||
}, | ||
"qualifiedValueShape": { | ||
"@id": "sh:qualifiedValueShape", | ||
"@type": "@id", | ||
"@container": "@list" | ||
}, | ||
"qualifiedValueShapesDisjoint": { | ||
"@id": "sh:qualifiedValueShapesDisjoint", | ||
"@type": "xsd:boolean" | ||
}, | ||
"qualifiedMinCount": { | ||
"@id": "sh:qualifiedMinCount", | ||
"@type": "xsd:integer" | ||
}, | ||
"qualifiedMaxCount": { | ||
"@id": "sh:qualifiedMaxCount", | ||
"@type": "xsd:integer" | ||
}, | ||
"maxCount": { | ||
"@id": "sh:maxCount", | ||
"@type": "xsd:integer" | ||
}, | ||
"minCount": { | ||
"@id": "sh:minCount", | ||
"@type": "xsd:integer" | ||
}, | ||
"minInclusive": "sh:minInclusive", | ||
"maxInclusive": "sh:maxInclusive", | ||
"maxExclusive": "sh:maxExclusive", | ||
"minExclusive": "sh:minExclusive", | ||
"in": { | ||
"@id": "sh:in", | ||
"@container": "@list" | ||
}, | ||
"imports": { | ||
"@id": "owl:imports", | ||
"@type": "@id", | ||
"@container": "@set" | ||
}, | ||
"datatype": { | ||
"@id": "sh:datatype", | ||
"@type": "@id" | ||
}, | ||
"description": "sh:description", | ||
"name": "sh:name", | ||
"nodeKind": { | ||
"@id": "sh:nodeKind", | ||
"@type": "@id" | ||
}, | ||
"node": { | ||
"@id": "sh:node", | ||
"@type": "@id" | ||
}, | ||
"property": { | ||
"@id": "sh:property", | ||
"@type": "@id", | ||
"@container": "@set" | ||
}, | ||
"targetClass": { | ||
"@id": "sh:targetClass", | ||
"@type": "@id" | ||
}, | ||
"targetObjectsOf": { | ||
"@id": "sh:targetObjectsOf", | ||
"@type": "@id" | ||
}, | ||
"targetSubjectsOf": { | ||
"@id": "sh:targetSubjectsOf", | ||
"@type": "@id" | ||
}, | ||
"isDefinedBy": { | ||
"@id": "http://www.w3.org/2000/01/rdf-schema#isDefinedBy", | ||
"@type": "@id" | ||
}, | ||
"shapes": { | ||
"@reverse": "http://www.w3.org/2000/01/rdf-schema#isDefinedBy", | ||
"@type": "@id", | ||
"@container": "@set" | ||
}, | ||
"or": { | ||
"@id": "sh:or", | ||
"@type": "@id", | ||
"@container": "@list" | ||
}, | ||
"and": { | ||
"@id": "sh:and", | ||
"@type": "@id", | ||
"@container": "@list" | ||
}, | ||
"xone": { | ||
"@id": "sh:xone", | ||
"@type": "@id", | ||
"@container": "@list" | ||
}, | ||
"not": { | ||
"@id": "sh:not", | ||
"@type": "@id", | ||
"@container": "@list" | ||
}, | ||
"lessThan": { | ||
"@id": "sh:lessThan", | ||
"@type": "@id" | ||
}, | ||
"hasValue": "sh:hasValue", | ||
"owl": "http://www.w3.org/2002/07/owl#", | ||
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", | ||
"rdfs": "http://www.w3.org/2000/01/rdf-schema#", | ||
"xsd": "http://www.w3.org/2001/XMLSchema#" | ||
} | ||
} |
Oops, something went wrong.