From 0ed5b762d913af4549052b70176cf3b8ae91c289 Mon Sep 17 00:00:00 2001 From: Mihai Surdeanu Date: Tue, 5 May 2026 18:25:41 -0700 Subject: [PATCH 1/5] added publish.sbt --- build.sbt | 62 +-------------------------------------------- project/plugins.sbt | 4 ++- publish.sbt | 62 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 62 deletions(-) create mode 100644 publish.sbt diff --git a/build.sbt b/build.sbt index e464785..9470c28 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 @@ -7,15 +6,11 @@ val scala213 = "2.13.18" // up to 2.13.18 val scala31 = "3.1.3" // up to 3.1.3 // Only the LTS versions are listed next. val scala33 = "3.3.7" // up to 3.3.7 -val scala3 = scala31 +val scala3 = scala33 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..02a5ca2 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-25. 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..20e064a --- /dev/null +++ b/publish.sbt @@ -0,0 +1,62 @@ +import org.clulab.sbt.DependencyFilter +import org.clulab.sbt.DependencyId + +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 / 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 // 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") From 4586f431f07064e60143568fb2762d36ed32edfc Mon Sep 17 00:00:00 2001 From: Mihai Surdeanu Date: Tue, 5 May 2026 18:26:25 -0700 Subject: [PATCH 2/5] added release.sbt --- release.sbt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 release.sbt 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. From 7b926e3358f3d1828d53e64f6cf605ecde25e43d Mon Sep 17 00:00:00 2001 From: Keith Alcock Date: Tue, 5 May 2026 19:39:38 -0700 Subject: [PATCH 3/5] Touch up sbt files --- build.sbt | 2 +- project/plugins.sbt | 2 +- publish.sbt | 11 ----------- version.sbt | 2 +- 4 files changed, 3 insertions(+), 14 deletions(-) diff --git a/build.sbt b/build.sbt index 9470c28..e5768af 100644 --- a/build.sbt +++ b/build.sbt @@ -6,7 +6,7 @@ val scala213 = "2.13.18" // up to 2.13.18 val scala31 = "3.1.3" // up to 3.1.3 // Only the LTS versions are listed next. val scala33 = "3.3.7" // up to 3.3.7 -val scala3 = scala33 +val scala3 = scala31 ThisBuild / crossScalaVersions := Seq(scala212, scala211, scala213, scala3) ThisBuild / scalaVersion := scala212 diff --git a/project/plugins.sbt b/project/plugins.sbt index 02a5ca2..026b586 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ -// Latest version numbers were updated on 2026-05-25. +// 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: diff --git a/publish.sbt b/publish.sbt index 20e064a..8db0102 100644 --- a/publish.sbt +++ b/publish.sbt @@ -1,6 +1,3 @@ -import org.clulab.sbt.DependencyFilter -import org.clulab.sbt.DependencyId - import scala.xml.Node import scala.xml.transform.RuleTransformer @@ -24,14 +21,6 @@ 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 / 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 // no longer applicable in sbt 1.6.2+ ThisBuild / publishTo := { val useArtifactory = false 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" From 0607f9f1e747592122acdfc3d83514ea74a87297 Mon Sep 17 00:00:00 2001 From: Mihai Surdeanu Date: Tue, 5 May 2026 20:30:45 -0700 Subject: [PATCH 4/5] update update date --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 02a5ca2..026b586 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ -// Latest version numbers were updated on 2026-05-25. +// 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: From 33bb76b91f6534de92439f396e271758000ec77c Mon Sep 17 00:00:00 2001 From: Mihai Surdeanu Date: Wed, 6 May 2026 09:41:27 -0700 Subject: [PATCH 5/5] Added changes --- CHANGES.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 CHANGES.md 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 +