aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md33
-rw-r--r--build.sbt40
-rw-r--r--project/Dependencies.scala9
-rw-r--r--project/plugins.sbt1
4 files changed, 69 insertions, 14 deletions
diff --git a/README.md b/README.md
index dbf0ead..55a4b01 100644
--- a/README.md
+++ b/README.md
@@ -11,19 +11,42 @@ In order to use this program you need to have [RDFox](https://www.oxfordsemantic
11RDFox is proprietary software and as such we are not able to distribute it along with our code. 11RDFox is proprietary software and as such we are not able to distribute it along with our code.
12Please refer to [this link](https://www.oxfordsemantic.tech/tryrdfoxforfree) to request a free trial. 12Please refer to [this link](https://www.oxfordsemantic.tech/tryrdfoxforfree) to request a free trial.
13 13
14This software has been developed and tested with RDFox v.4.0 14This software has been developed and tested with RDFox v.4.1
15 15
16## Using the software 16## Using the software
17 17
18TODO 18We assume you followed [these steps](https://docs.oxfordsemantic.tech/getting-started.html#getting-started) in order to setup RDFox on your personal machine and in particular you know the path to the `JRDFox.jar` library that comes with the distribution.
19 19
20### Provide RDFox license 20### Provide RDFox license
21 21
22TODO 22The [documentation](https://docs.oxfordsemantic.tech/features-and-requirements.html#license-key), describes several ways to provide the license to RDFox.
23 23
24### Compiling the project 24One easy way is to put your license key in a file `RDFox.lic` in `$HOME/.RDFox/`, with adeguate read permissions for the user executing the program.
25 25
26TODO 26### Compiling and running the project
27
28The project uses [sbt](https://www.scala-sbt.org/) to manage dependences.
29
30To compile the project run the following from the base directory:
31```
32sbt compile
33```
34
35The project uses the sbt plugin [sbt-assembly](https://github.com/sbt/sbt-assembly) to produce a fat jar with all the required dependences.
36Run the following from the base directory of the project to produce a standalone `jar` file.
37```
38sbt assembly
39```
40
41The output of the command will print the location of the produced jar. Execute it with
42```
43java -jar <path/to/fat.jar> [<option> ...]
44```
45
46Note that the fat jar file distributed with this repository excludes the RDFox as a dependency. Provided that you have the RDFox setup on your machine, you can run the program as follows
47```
48java -cp <path/to/JRDFox.jar>:<path/to/fat.jar> uk.ac.ox.cs.rsacomb.RSAComb [<option> ...]
49```
27 50
28### Running tests and examples 51### Running tests and examples
29 52
diff --git a/build.sbt b/build.sbt
index 860b064..4b774e7 100644
--- a/build.sbt
+++ b/build.sbt
@@ -1,10 +1,10 @@
1import Dependencies._ 1import Dependencies._
2 2
3ThisBuild / scalaVersion := "2.13.4" 3ThisBuild / scalaVersion := "2.13.4"
4ThisBuild / version := "0.1.0" 4ThisBuild / version := "0.1.0"
5ThisBuild / organization := "uk.ac.ox.cs.rsacomb" 5ThisBuild / organization := "uk.ac.ox.cs.rsacomb"
6ThisBuild / organizationName := "Department of Computer Science - University of Oxford" 6ThisBuild / organizationName := "Department of Computer Science - University of Oxford"
7ThisBuild / organizationHomepage := Some(url("https://www.cs.ox.ac.uk")) 7ThisBuild / organizationHomepage := Some(url("https://www.cs.ox.ac.uk"))
8 8
9ThisBuild / scmInfo := Some( 9ThisBuild / scmInfo := Some(
10 ScmInfo( 10 ScmInfo(
@@ -23,7 +23,9 @@ ThisBuild / scmInfo := Some(
23 23
24ThisBuild / description := "Re-implementation of the combined approach for CQ answering over RSA ontologies." 24ThisBuild / description := "Re-implementation of the combined approach for CQ answering over RSA ontologies."
25// ThisBuild / licenses := List("Apache 2" -> new URL("http://www.apache.org/licenses/LICENSE-2.0.txt")) 25// ThisBuild / licenses := List("Apache 2" -> new URL("http://www.apache.org/licenses/LICENSE-2.0.txt"))
26ThisBuild / homepage := Some(url("https://github.com/KRR-Oxford/RSA-combined-approach")) 26ThisBuild / homepage := Some(
27 url("https://github.com/KRR-Oxford/RSA-combined-approach")
28)
27 29
28lazy val root = (project in file(".")) 30lazy val root = (project in file("."))
29 .settings( 31 .settings(
@@ -36,3 +38,29 @@ lazy val root = (project in file("."))
36 graphcore 38 graphcore
37 ) 39 )
38 ) 40 )
41
42/** Exclude RDFox from the building process
43 *
44 * @see https://github.com/sbt/sbt-assembly#excluding-jars-and-files
45 * for different ways to exclude a specific package from the building
46 * process.
47 */
48assemblyExcludedJars in assembly := {
49 val cp = (fullClasspath in assembly).value
50 cp filter { _.data.getName == "JRDFox.jar" }
51}
52
53/** See these links for more info on merging strategies in
54 * `sbt-assembly`
55 *
56 * https://github.com/sbt/sbt-assembly#merge-strategy
57 * https://stackoverflow.com/a/55557287
58 */
59assemblyMergeStrategy in assembly := {
60 case "module-info.class" =>
61 MergeStrategy.discard
62 case x => {
63 val oldStrategy = (assemblyMergeStrategy in assembly).value
64 oldStrategy(x)
65 }
66}
diff --git a/project/Dependencies.scala b/project/Dependencies.scala
index 39e8e2e..a185615 100644
--- a/project/Dependencies.scala
+++ b/project/Dependencies.scala
@@ -8,8 +8,11 @@ object Dependencies {
8 8
9 // Libraries 9 // Libraries
10 val scalatest = "org.scalatest" %% "scalatest" % scalatestVersion 10 val scalatest = "org.scalatest" %% "scalatest" % scalatestVersion
11 val scalatestFlatSpec = "org.scalatest" %% "scalatest-flatspec" % scalatestVersion 11 val scalatestFlatSpec =
12 val scalatestShouldMatchers = "org.scalatest" %% "scalatest-shouldmatchers" % scalatestVersion 12 "org.scalatest" %% "scalatest-flatspec" % scalatestVersion
13 val apibinding = "net.sourceforge.owlapi" % "owlapi-apibinding" % owlapiVersion 13 val scalatestShouldMatchers =
14 "org.scalatest" %% "scalatest-shouldmatchers" % scalatestVersion
15 val apibinding =
16 "net.sourceforge.owlapi" % "owlapi-apibinding" % owlapiVersion
14 val graphcore = "org.scala-graph" %% "graph-core" % scalagraphVersion 17 val graphcore = "org.scala-graph" %% "graph-core" % scalagraphVersion
15} 18}
diff --git a/project/plugins.sbt b/project/plugins.sbt
new file mode 100644
index 0000000..72477a2
--- /dev/null
+++ b/project/plugins.sbt
@@ -0,0 +1 @@
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0")