From 4cc229974e4e00457ef56705ff252fe63dae5de4 Mon Sep 17 00:00:00 2001 From: "s.bhargwa" Date: Tue, 9 Sep 2025 19:12:14 +0530 Subject: [PATCH 1/3] Use Central Publisher Portal --- .github/workflows/publish.yml | 4 ++-- build.sbt | 17 ++-------------- project/BuildSettings.scala | 4 ++++ project/build.properties | 2 +- project/plugins.sbt | 2 -- publish.sbt | 37 +++++++++++++++++++++++++++++++++++ 6 files changed, 46 insertions(+), 20 deletions(-) create mode 100644 project/BuildSettings.scala create mode 100644 publish.sbt diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e6e38a2b..68167d8d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -42,12 +42,12 @@ jobs: gpg_private_key: ${{ secrets.PGP_SECRET }} passphrase: ${{ secrets.PGP_PASSPHRASE }} - - name: Publish to Sonatype + - name: Publish to Central Portal env: SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} run: | - sbt -Dsbt.color=always -Dsbt.supershell=false publishSigned sonatypeBundleRelease + sbt -Dsbt.color=always -Dsbt.supershell=false publishSigned sonaRelease - name: Publish API docs to GitHub Pages run: | diff --git a/build.sbt b/build.sbt index d4b38ebf..d3ab02a1 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,5 @@ name := "stream-loader" -ThisBuild / organization := "com.adform" -ThisBuild / organizationName := "Adform" ThisBuild / scalaVersion := "2.13.15" ThisBuild / scalacOptions := Seq( "-unchecked", @@ -14,17 +12,9 @@ ThisBuild / scalacOptions := Seq( "-Wconf:msg=While parsing annotations in:silent" ) -ThisBuild / startYear := Some(2020) -ThisBuild / licenses += ("MPL-2.0", url("http://mozilla.org/MPL/2.0/")) - -ThisBuild / developers := List( - Developer("sauliusvl", "Saulius Valatka", "saulius.vl@gmail.com", url("https://github.com/sauliusvl")) -) - enablePlugins(GitVersioning) -val gitRepo = "adform/stream-loader" -val gitRepoUrl = s"https://github.com/$gitRepo" +import BuildSettings._ ThisBuild / git.useGitDescribe := true ThisBuild / git.remoteRepo := { @@ -290,10 +280,7 @@ lazy val commonSettings = Seq( .getMethod("getLogger", cl.loadClass("java.lang.String")) .invoke(null, "ROOT") // Prevents slf4j replay warnings during tests ) - ), - publishTo := sonatypePublishToBundle.value, - homepage := Some(url(gitRepoUrl)), - scmInfo := Some(ScmInfo(url(gitRepoUrl), s"scm:git:git@github.com:$gitRepo.git")) + ) ) lazy val copyDocAssets = taskKey[File]("Copy unidoc resources") diff --git a/project/BuildSettings.scala b/project/BuildSettings.scala new file mode 100644 index 00000000..14614d1b --- /dev/null +++ b/project/BuildSettings.scala @@ -0,0 +1,4 @@ +object BuildSettings { + val gitRepo = "adform/stream-loader" + val gitRepoUrl = s"https://github.com/$gitRepo" +} diff --git a/project/build.properties b/project/build.properties index 0b699c30..c02c575f 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.2 +sbt.version=1.11.3 diff --git a/project/plugins.sbt b/project/plugins.sbt index 9d5b3cfe..8e9c2f6e 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -21,5 +21,3 @@ libraryDependencies += "net.sourceforge.plantuml" % "plantuml" % "1.2024.8" addSbtPlugin("com.github.sbt" % "sbt-ghpages" % "0.8.0") addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.0") - -addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.12.2") diff --git a/publish.sbt b/publish.sbt new file mode 100644 index 00000000..b95c5b00 --- /dev/null +++ b/publish.sbt @@ -0,0 +1,37 @@ +ThisBuild / organization := "com.adform" +ThisBuild / organizationName := "Adform" +ThisBuild / organizationHomepage := Some(url("https://www.adform.com")) + +import BuildSettings._ + +ThisBuild / startYear := Some(2020) +ThisBuild / description := "Stream Loader: load data from Kafka into multiple backends" +ThisBuild / homepage := Some(url(gitRepoUrl)) + +ThisBuild / licenses := List( + "MPL-2.0" -> url("http://mozilla.org/MPL/2.0/") +) + +ThisBuild / developers := List( + Developer( + id = "sauliusvl", + name = "Saulius Valatka", + email = "saulius.vl@gmail.com", + url = url("https://github.com/sauliusvl") + ) +) + +ThisBuild / scmInfo := Some( + ScmInfo(url(gitRepoUrl), s"scm:git:git@github.com:$gitRepo.git") +) + +// Remove all additional repository other than Maven Central from POM +ThisBuild / pomIncludeRepository := { _ => false } +ThisBuild / publishMavenStyle := true + +// Use Central Portal instead of OSSRH +ThisBuild / publishTo := { + val centralSnapshots = "https://central.sonatype.com/repository/maven-snapshots/" + if (isSnapshot.value) Some("central-snapshots" at centralSnapshots) + else localStaging.value +} \ No newline at end of file From 9e4fa0e649de6690cf26e500fa3768feab6e88f7 Mon Sep 17 00:00:00 2001 From: "s.bhargwa" Date: Tue, 9 Sep 2025 19:30:55 +0530 Subject: [PATCH 2/3] formatting --- project/BuildSettings.scala | 2 +- publish.sbt | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/project/BuildSettings.scala b/project/BuildSettings.scala index 14614d1b..e83d40f4 100644 --- a/project/BuildSettings.scala +++ b/project/BuildSettings.scala @@ -1,4 +1,4 @@ object BuildSettings { - val gitRepo = "adform/stream-loader" + val gitRepo = "adform/stream-loader" val gitRepoUrl = s"https://github.com/$gitRepo" } diff --git a/publish.sbt b/publish.sbt index b95c5b00..d43e3177 100644 --- a/publish.sbt +++ b/publish.sbt @@ -14,10 +14,10 @@ ThisBuild / licenses := List( ThisBuild / developers := List( Developer( - id = "sauliusvl", - name = "Saulius Valatka", + id = "sauliusvl", + name = "Saulius Valatka", email = "saulius.vl@gmail.com", - url = url("https://github.com/sauliusvl") + url = url("https://github.com/sauliusvl") ) ) @@ -34,4 +34,4 @@ ThisBuild / publishTo := { val centralSnapshots = "https://central.sonatype.com/repository/maven-snapshots/" if (isSnapshot.value) Some("central-snapshots" at centralSnapshots) else localStaging.value -} \ No newline at end of file +} From 60ded9ce68fae97c23c3d461d203e18e7a91920d Mon Sep 17 00:00:00 2001 From: "s.bhargwa" Date: Tue, 9 Sep 2025 19:44:12 +0530 Subject: [PATCH 3/3] ignore test case --- .../com/adform/streamloader/VerticaIntegrationTests.scala | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stream-loader-tests/src/test/scala/com/adform/streamloader/VerticaIntegrationTests.scala b/stream-loader-tests/src/test/scala/com/adform/streamloader/VerticaIntegrationTests.scala index fc830c7b..c21be981 100644 --- a/stream-loader-tests/src/test/scala/com/adform/streamloader/VerticaIntegrationTests.scala +++ b/stream-loader-tests/src/test/scala/com/adform/streamloader/VerticaIntegrationTests.scala @@ -12,6 +12,7 @@ import com.adform.streamloader.behaviors.BasicLoaderBehaviors import com.adform.streamloader.fixtures._ import com.adform.streamloader.storage._ import com.zaxxer.hikari.{HikariConfig, HikariDataSource} +import org.scalatest.Ignore import org.scalatest.concurrent.Eventually import org.scalatest.funspec.AnyFunSpec import org.scalatest.matchers.should.Matchers @@ -21,6 +22,9 @@ import org.scalatestplus.scalacheck.Checkers import scala.concurrent.ExecutionContext @Slow +// Temporarily ignore Vertica tests, vertica-ce image is not available on DockerHub +// https://github.com/vertica/vertica-containers/issues/64 +@Ignore class VerticaIntegrationTests extends AnyFunSpec with Matchers