forked from clulab/reach
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
118 lines (95 loc) · 3.04 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
import ReleaseTransformations._
lazy val commonSettings = Seq(
organization := "org.clulab",
scalaVersion := "2.11.11",
scalacOptions ++= Seq("-feature", "-unchecked", "-deprecation"),
testOptions in Test += Tests.Argument("-oD"),
parallelExecution in Global := false,
// 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/reach</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/reach</url>
<connection>https://github.com/clulab/reach</connection>
</scm>
<developers>
<developer>
<id>mihai.surdeanu</id>
<name>Mihai Surdeanu</name>
<email>mihai@surdeanu.info</email>
</developer>
</developers>
//
// end publishing settings
//
)
lazy val root = (project in file("."))
.settings(commonSettings: _*)
.aggregate(main, causalAssembly, export)
.dependsOn(main % "test->test;compile", causalAssembly, export) // so that we can import from the console
.settings(
name := "reach-exe",
aggregate in test := false,
aggregate in assembly := false,
test in assembly := {},
mainClass in assembly := {
val sysMain = System.getProperty("mainClass")
Option(if (sysMain != null) sysMain else "org.clulab.reach.RunReachCLI")
},
assemblyJarName in assembly := s"reach-${version.value}-FAT.jar"
)
lazy val main = project
.settings(commonSettings:_*)
lazy val causalAssembly = project.in(file("assembly"))
.settings(commonSettings:_*)
.dependsOn(main % "test->test;compile->compile")
lazy val export = project
.settings(commonSettings:_*)
.dependsOn(main % "test->test;compile->compile", causalAssembly % "test;compile") // need access to assembly/src/resources
lazy val webapp = project
.enablePlugins(PlayScala)
.aggregate(main)
.dependsOn(main)
//
// publishing settings
//
// these are the steps to be performed during release
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
ReleaseStep(action = Command.process("publishSigned", _)),
ReleaseStep(action = Command.process("sonatypeReleaseAll", _)),
commitReleaseVersion,
tagRelease,
setNextVersion,
commitNextVersion,
pushChanges
)
// settings for building project website
site.settings
// include documentation
site.includeScaladoc()
ghpages.settings
git.remoteRepo := "git@github.com:clulab/reach.git"