From 35f41c0529f65c4b3ee941e087d497a931d17d9e Mon Sep 17 00:00:00 2001 From: Federico Igne Date: Fri, 8 Jan 2021 17:50:57 +0000 Subject: Add sbt plugin to create jar with dependences Also update README.md with info on how to compile and run the program. --- build.sbt | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) (limited to 'build.sbt') diff --git a/build.sbt b/build.sbt index 860b064..4b774e7 100644 --- a/build.sbt +++ b/build.sbt @@ -1,10 +1,10 @@ import Dependencies._ -ThisBuild / scalaVersion := "2.13.4" -ThisBuild / version := "0.1.0" -ThisBuild / organization := "uk.ac.ox.cs.rsacomb" -ThisBuild / organizationName := "Department of Computer Science - University of Oxford" -ThisBuild / organizationHomepage := Some(url("https://www.cs.ox.ac.uk")) +ThisBuild / scalaVersion := "2.13.4" +ThisBuild / version := "0.1.0" +ThisBuild / organization := "uk.ac.ox.cs.rsacomb" +ThisBuild / organizationName := "Department of Computer Science - University of Oxford" +ThisBuild / organizationHomepage := Some(url("https://www.cs.ox.ac.uk")) ThisBuild / scmInfo := Some( ScmInfo( @@ -23,7 +23,9 @@ ThisBuild / scmInfo := Some( ThisBuild / description := "Re-implementation of the combined approach for CQ answering over RSA ontologies." // ThisBuild / licenses := List("Apache 2" -> new URL("http://www.apache.org/licenses/LICENSE-2.0.txt")) -ThisBuild / homepage := Some(url("https://github.com/KRR-Oxford/RSA-combined-approach")) +ThisBuild / homepage := Some( + url("https://github.com/KRR-Oxford/RSA-combined-approach") +) lazy val root = (project in file(".")) .settings( @@ -36,3 +38,29 @@ lazy val root = (project in file(".")) graphcore ) ) + +/** Exclude RDFox from the building process + * + * @see https://github.com/sbt/sbt-assembly#excluding-jars-and-files + * for different ways to exclude a specific package from the building + * process. + */ +assemblyExcludedJars in assembly := { + val cp = (fullClasspath in assembly).value + cp filter { _.data.getName == "JRDFox.jar" } +} + +/** See these links for more info on merging strategies in + * `sbt-assembly` + * + * https://github.com/sbt/sbt-assembly#merge-strategy + * https://stackoverflow.com/a/55557287 + */ +assemblyMergeStrategy in assembly := { + case "module-info.class" => + MergeStrategy.discard + case x => { + val oldStrategy = (assemblyMergeStrategy in assembly).value + oldStrategy(x) + } +} -- cgit v1.2.3