-
Notifications
You must be signed in to change notification settings - Fork 24
/
publish.sbt
62 lines (57 loc) · 2.12 KB
/
publish.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
import org.clulab.sbt.BuildUtils
import org.clulab.sbt.DependencyFilter
import org.clulab.sbt.DependencyId
import scala.xml.Node
import scala.xml.transform.RuleTransformer
val publication = "eidos"
ThisBuild / developers := List(
Developer(
id = "mihai.surdeanu",
name = "Mihai Surdeanu",
email = "msurdeanu@email.arizona.edu",
url = url("https://www.cs.arizona.edu/person/mihai-surdeanu")
)
)
ThisBuild / homepage := Some(url(s"https://github.com/clulab/$publication"))
ThisBuild / licenses := List(
"Apache License, Version 2.0" ->
url("http://www.apache.org/licenses/LICENSE-2.0.html")
)
ThisBuild / organization := "org.clulab"
ThisBuild / organizationHomepage := Some(url("http://clulab.org/"))
ThisBuild / organizationName := "Computational Language Understanding (CLU) Lab"
// The sonatype plugin seems to overwrite these two values, so they are in sonatype.sbt.
// ThisBuild / pomIncludeRepository := BuildUtils.keepHttpRepos
ThisBuild / pomPostProcess := {
val logback = DependencyId("ch.qos.logback", "logback-classic")
val rule = DependencyFilter { dependencyId =>
dependencyId != logback
}
(node: Node) => new RuleTransformer(rule).transform(node).head
}
// ThisBuild / publishMavenStyle := true
ThisBuild / publishTo := {
if (BuildUtils.useArtifactory) {
val artifactory = "http://artifactory.cs.arizona.edu:8081/artifactory/"
val repository = "sbt-release-local"
val details =
if (isSnapshot.value) ";build.timestamp=" + new java.util.Date().getTime
else ""
val location = artifactory + repository + details
Some(("Artifactory Realm" at location).withAllowInsecureProtocol(true))
}
else {
// This is for maven central, the default for when not artifactory.
val nexus = "https://oss.sonatype.org/" // the standard maven repository
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
}
ThisBuild / scmInfo := Some(
ScmInfo(
url(s"https://github.com/clulab/$publication"),
s"scm:git@github.com:clulab/$publication.git"
)
)