forked from banana-rdf/banana-rdf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
191 lines (170 loc) · 5.97 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
import com.typesafe.sbt.SbtScalariform.defaultScalariformSettings
import sbt.Keys._
import sbt._
import Dependencies._
import com.typesafe.sbt.pgp.PgpKeys
lazy val pomSettings = Seq(
pomIncludeRepository := { _ => false},
pomExtra :=
<url>https://github.com/w3c/banana-rdf</url>
<developers>
<developer>
<id>betehess</id>
<name>Alexandre Bertails</name>
<url>http://bertails.org/</url>
</developer>
<developer>
<id>InTheNow</id>
<name>Alistair Johnson</name>
<url>https://github.com/inthenow</url>
</developer>
<developer>
<id>bblfish</id>
<name>Henry Story</name>
<url>http://bblfish.net/</url>
</developer>
</developers>
<scm>
<url>[email protected]:w3c/banana-rdf.git</url>
<connection>scm:git:[email protected]:w3c/banana-rdf.git</connection>
</scm>
,
licenses +=("W3C", url("http://opensource.org/licenses/W3C"))
)
//sbt -Dbanana.publish=bblfish.net:/home/hjs/htdocs/work/repo/
//sbt -Dbanana.publish=bintray
lazy val publicationSettings = pomSettings ++ {
val pubre = """([^:]+):([^:]+)""".r
Option(System.getProperty("banana.publish")) match {
case Some("bintray") | None => Seq(
// removed due to issue https://github.com/typesafehub/dbuild/issues/158
// publishTo := {
// val nexus = "https://oss.sonatype.org/"
// if (isSnapshot.value)
// Some("snapshots" at nexus + "content/repositories/snapshots")
// else
// Some("releases" at nexus + "service/local/staging/deploy/maven2")
// },
// releasePublishArtifactsAction := PgpKeys.publishSigned.value,
// publishArtifact in Test := false
)
case Some(pubre(host, path)) =>
Seq(
publishTo := Some(
Resolver.ssh("banana.publish specified server",
host,
path + {
if (isSnapshot.value) "snapshots" else "releases"
}
)
),
publishArtifact in Test := false
)
case other => Seq()
}
}
lazy val commonSettings = publicationSettings ++ defaultScalariformSettings ++ Seq(
organization := "org.w3",
scalaVersion := "2.12.1",
crossScalaVersions := Seq("2.11.8", "2.12.1"),
javacOptions ++= Seq("-source", "1.8", "-target", "1.8"),
resolvers += "apache-repo-releases" at "http://repository.apache.org/content/repositories/releases/",
fork := false,
parallelExecution in Test := false,
offline := true,
scalacOptions ++= Seq("-deprecation", "-unchecked", "-feature", "-language:implicitConversions,higherKinds", "-Xmax-classfile-name", "140"),
scalacOptions in(Compile, doc) := Seq("-groups", "-implicits"),
description := "RDF framework for Scala",
startYear := Some(2012),
updateOptions := updateOptions.value.withCachedResolution(true) //to speed up dependency resolution
)
lazy val rdf = crossProject
.crossType(CrossType.Full)
.in(file("rdf")) //websim api
.settings(commonSettings: _*)
.settings(
name := "banana-rdf",
libraryDependencies += scalaz
)
.jvmSettings(
libraryDependencies ++= Seq(jodaTime, jodaConvert)
)
lazy val rdfJS = rdf.js
lazy val rdfJVM = rdf.jvm
lazy val ntriples = crossProject
.crossType(CrossType.Full)
.settings(commonSettings: _*)
.in(file("ntriples"))
.dependsOn(rdf)
lazy val ntriplesJS = ntriples.js
lazy val ntriplesJVM = ntriples.jvm
lazy val rdfTestSuite = crossProject
.crossType(CrossType.Full)
.in(file("rdf-test-suite"))
.settings(commonSettings: _*)
.settings(
name := "banana-test",
libraryDependencies += scalatest,
libraryDependencies += jodaTime,
libraryDependencies += jodaConvert,
libraryDependencies += fuseki,
libraryDependencies += fusekiServer,
libraryDependencies += servlet,
libraryDependencies += httpComponents,
resourceDirectory in Test := baseDirectory.value / "src/main/resources"
)
.dependsOn(rdf, ntriples)
lazy val rdfTestSuiteJVM = rdfTestSuite.jvm
lazy val rdfTestSuiteJS = rdfTestSuite.js
lazy val plantain = crossProject
.crossType(CrossType.Full)
.in(file("plantain"))
.settings(commonSettings: _*)
.settings(
libraryDependencies ++= Seq(akkaHttpCore, sesameRioTurtle, jsonldJava)
)
.settings(name := "banana-plantain")
.dependsOn(rdf, ntriples, rdfTestSuite % "test->compile")
lazy val plantainJS = plantain.js
lazy val plantainJVM = plantain.jvm
lazy val jena = Project("jena", file("jena"), settings = commonSettings)
.settings(
name := "banana-jena",
libraryDependencies ++= Seq(jenaLibs, commonsLogging, aalto )
).dependsOn(rdfJVM, ntriplesJVM, rdfTestSuiteJVM % "test->compile")
lazy val sesame = Project("sesame", file("sesame"), settings = commonSettings)
.settings(
name := "banana-sesame",
libraryDependencies ++= Seq(
sesameQueryAlgebra,
sesameQueryParser,
sesameQueryResult,
sesameRioTurtle,
sesameRioRdfxml,
sesameSailMemory,
sesameSailNativeRdf,
sesameRepositorySail,
commonsLogging,
jsonldJava
)
).dependsOn(rdfJVM, ntriplesJVM, rdfTestSuiteJVM % "test->compile")
lazy val jsonldJS = Project("jsonld", file("jsonld.js"), settings = commonSettings)
.settings(
name := "banana-jsonld"
).dependsOn(rdfJS, ntriplesJS, plantainJS, rdfTestSuiteJS % "test->compile")
.enablePlugins(ScalaJSPlugin)
lazy val examples = Project("examples", file("misc/examples"), settings = commonSettings)
.settings(
name := "banana-examples"
).dependsOn(sesame, jena)
lazy val runExamplesStr =
";examples/run-main org.w3.banana.examples.GraphExampleWithJena" +
";examples/run-main org.w3.banana.examples.GraphExampleWithSesame" +
";examples/run-main org.w3.banana.examples.IOExampleWithJena" +
";examples/run-main org.w3.banana.examples.IOExampleWithSesame" +
";examples/run-main org.w3.banana.examples.SPARQLExampleWithJena"
name := "banana"
commonSettings
unidocSettings
addCommandAlias("validate", ";compile;test;runExamples")
addCommandAlias("runExamples", runExamplesStr)