forked from clulab/processors
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
101 lines (89 loc) · 2.76 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
import ReleaseTransformations._
lazy val commonSettings = Seq(
organization := "org.clulab",
scalaVersion := "2.12.4",
crossScalaVersions := Seq("2.11.11", "2.12.4"),
scalacOptions ++= Seq("-feature", "-unchecked", "-deprecation"),
parallelExecution in Test := false,
scalacOptions in (Compile, doc) += "-no-link-warnings", // suppresses problems with scaladoc @throws links
//
// publishing settings
//
// publish to a maven repo
publishMavenStyle := true,
// the standard maven repository
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")
},
// let’s remove any repositories for optional dependencies in our artifact
pomIncludeRepository := { _ => false },
// mandatory stuff to add to the pom for publishing
pomExtra :=
<url>https://github.com/clulab/processors</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>https://github.com/clulab/processors</url>
<connection>https://github.com/clulab/processors</connection>
</scm>
<developers>
<developer>
<id>mihai.surdeanu</id>
<name>Mihai Surdeanu</name>
<email>[email protected]</email>
</developer>
</developers>
//
// end publishing settings
//
)
lazy val root = (project in file("."))
.settings(commonSettings: _*)
.settings(
publishArtifact := false,
publishTo := Some("dummy" at "nowhere"),
publish := {},
publishLocal := {},
publishM2 := {},
Keys.`package` := {
// avoid generating an empty jar for the root project
(Keys.`package` in (main, Compile)).value
}
)
.aggregate(main, odin, corenlp, openie)
.dependsOn(main, odin, corenlp, openie) // so that we can import from the console
lazy val main = project
.settings(commonSettings: _*)
lazy val odin = project
.settings(commonSettings: _*)
.dependsOn(main % "test->test;compile->compile")
lazy val corenlp = project
.settings(commonSettings: _*)
.dependsOn(main % "test->test;compile->compile")
lazy val openie = project
.settings(commonSettings: _*)
.dependsOn(main % "test->test;compile->compile", odin)
// release steps
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("+publishSigned"),
setNextVersion,
commitNextVersion,
releaseStepCommandAndRemaining("sonatypeReleaseAll"),
pushChanges
)