diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 0000000..8c2bafc --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,2 @@ ++ **0.2.0** - Cloned from lum.ai. Prepared for release on central.sonatype.com + diff --git a/build.sbt b/build.sbt index e464785..e5768af 100644 --- a/build.sbt +++ b/build.sbt @@ -1,4 +1,3 @@ -import ReleaseTransformations._ // Latest version numbers were updated on 2026-04-24. val scala211 = "2.11.12" // up to 2.11.12 @@ -12,10 +11,6 @@ val scala3 = scala31 ThisBuild / crossScalaVersions := Seq(scala212, scala211, scala213, scala3) ThisBuild / scalaVersion := scala212 -name := "nxmlreader" - -organization := "ai.lum" - scalacOptions ++= { val noAdaptedArgsOpt = CrossVersion.partialVersion(scalaVersion.value) match { case Some((2, 11)) => Some("-Yno-adapted-args") @@ -70,58 +65,3 @@ libraryDependencies ++= { ) } -releaseProcess := Seq[ReleaseStep]( - checkSnapshotDependencies, - inquireVersions, - runClean, - releaseStepCommandAndRemaining("+test"), - setReleaseVersion, - commitReleaseVersion, - tagRelease, - releaseStepCommandAndRemaining("+publishSigned"), - setNextVersion, - commitNextVersion, - releaseStepCommandAndRemaining("sonatypeReleaseAll"), - pushChanges -) - -// Publishing settings - -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") -} - -publishMavenStyle := true - -publishArtifact in Test := false - -pomIncludeRepository := { _ => false } - -pomExtra := - https://github.com/lum-ai/nxmlreader - - - Apache 2 - http://www.apache.org/licenses/LICENSE-2.0.txt - - - - scm:git:github.com/lum-ai/nxmlreader - scm:git:git@github.com:lum-ai/nxmlreader.git - - - - marcovzla - Marco Antonio Valenzuela Escárcega - lum.ai - - - ghp - Gus Hahn-Powell - lum.ai - - diff --git a/project/plugins.sbt b/project/plugins.sbt index c6993db..026b586 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,3 +1,5 @@ -// Latest version numbers were updated on 2026-04-24. +// Latest version numbers were updated on 2026-05-05. addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.1") // up to 2.3.1 addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0") // up to 1.4.0 +// For constructing the fat jar: +addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.3.1") // up to 2.3.1 diff --git a/publish.sbt b/publish.sbt new file mode 100644 index 0000000..8db0102 --- /dev/null +++ b/publish.sbt @@ -0,0 +1,51 @@ +import scala.xml.Node +import scala.xml.transform.RuleTransformer + +val publication = "nxmlreader" + +ThisBuild / developers := List( + Developer( + id = "mihai.surdeanu", + name = "Mihai Surdeanu", + email = "mihai@surdeanu.info", + 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. +// ThisBuild / pomIncludeRepository := { _ => false } // no longer applicable in sbt 1.6.2+ +// ThisBuild / publishMavenStyle := true // no longer applicable in sbt 1.6.2+ +ThisBuild / publishTo := { + val useArtifactory = false + + if (useArtifactory) { + val artifactory = "https://artifactory.clulab.org/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) + } + else { + if (isSnapshot.value) + Some("central-snapshots" at "https://central.sonatype.com/repository/maven-snapshots/") + else + localStaging.value + } +} +ThisBuild / scmInfo := Some( + ScmInfo( + url(s"https://github.com/clulab/$publication"), + s"scm:git@github.com:clulab/$publication.git" + ) +) +ThisBuild / versionScheme := Some("semver-spec") diff --git a/release.sbt b/release.sbt new file mode 100644 index 0000000..f62cc9e --- /dev/null +++ b/release.sbt @@ -0,0 +1,19 @@ +import ReleaseTransformations._ + +releaseProcess := Seq[ReleaseStep]( + checkSnapshotDependencies, + inquireVersions, + runClean, + runTest, + setReleaseVersion, + commitReleaseVersion, + tagRelease, + releaseStepCommandAndRemaining("+publishSigned"), + releaseStepCommandAndRemaining("sonaUpload"), + setNextVersion, + commitNextVersion, +// pushChanges +) + +Global / onChangedBuildSource := ReloadOnSourceChanges +Global / useGpg := false // GPG doesn't need to be installed, particularly for Windows. diff --git a/version.sbt b/version.sbt index 03a8b07..38a1b86 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -version in ThisBuild := "0.2.0-SNAPSHOT" +ThisBuild / version := "0.2.0-SNAPSHOT"