Skip to content

Commit da020ba

Browse files
authored
Merge pull request #57 from adform/migrate-to-central-portal
Use Maven Central Publisher Portal
2 parents 6586f1f + 60ded9c commit da020ba

File tree

7 files changed

+50
-20
lines changed

7 files changed

+50
-20
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ jobs:
4242
gpg_private_key: ${{ secrets.PGP_SECRET }}
4343
passphrase: ${{ secrets.PGP_PASSPHRASE }}
4444

45-
- name: Publish to Sonatype
45+
- name: Publish to Central Portal
4646
env:
4747
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
4848
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
4949
run: |
50-
sbt -Dsbt.color=always -Dsbt.supershell=false publishSigned sonatypeBundleRelease
50+
sbt -Dsbt.color=always -Dsbt.supershell=false publishSigned sonaRelease
5151
5252
- name: Publish API docs to GitHub Pages
5353
run: |

build.sbt

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
name := "stream-loader"
22

3-
ThisBuild / organization := "com.adform"
4-
ThisBuild / organizationName := "Adform"
53
ThisBuild / scalaVersion := "2.13.15"
64
ThisBuild / scalacOptions := Seq(
75
"-unchecked",
@@ -14,17 +12,9 @@ ThisBuild / scalacOptions := Seq(
1412
"-Wconf:msg=While parsing annotations in:silent"
1513
)
1614

17-
ThisBuild / startYear := Some(2020)
18-
ThisBuild / licenses += ("MPL-2.0", url("http://mozilla.org/MPL/2.0/"))
19-
20-
ThisBuild / developers := List(
21-
Developer("sauliusvl", "Saulius Valatka", "saulius.vl@gmail.com", url("https://github.com/sauliusvl"))
22-
)
23-
2415
enablePlugins(GitVersioning)
2516

26-
val gitRepo = "adform/stream-loader"
27-
val gitRepoUrl = s"https://github.com/$gitRepo"
17+
import BuildSettings._
2818

2919
ThisBuild / git.useGitDescribe := true
3020
ThisBuild / git.remoteRepo := {
@@ -290,10 +280,7 @@ lazy val commonSettings = Seq(
290280
.getMethod("getLogger", cl.loadClass("java.lang.String"))
291281
.invoke(null, "ROOT") // Prevents slf4j replay warnings during tests
292282
)
293-
),
294-
publishTo := sonatypePublishToBundle.value,
295-
homepage := Some(url(gitRepoUrl)),
296-
scmInfo := Some(ScmInfo(url(gitRepoUrl), s"scm:git:git@github.com:$gitRepo.git"))
283+
)
297284
)
298285

299286
lazy val copyDocAssets = taskKey[File]("Copy unidoc resources")

project/BuildSettings.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
object BuildSettings {
2+
val gitRepo = "adform/stream-loader"
3+
val gitRepoUrl = s"https://github.com/$gitRepo"
4+
}

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.10.2
1+
sbt.version=1.11.3

project/plugins.sbt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,3 @@ libraryDependencies += "net.sourceforge.plantuml" % "plantuml" % "1.2024.8"
2121
addSbtPlugin("com.github.sbt" % "sbt-ghpages" % "0.8.0")
2222

2323
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.0")
24-
25-
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.12.2")

publish.sbt

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
ThisBuild / organization := "com.adform"
2+
ThisBuild / organizationName := "Adform"
3+
ThisBuild / organizationHomepage := Some(url("https://www.adform.com"))
4+
5+
import BuildSettings._
6+
7+
ThisBuild / startYear := Some(2020)
8+
ThisBuild / description := "Stream Loader: load data from Kafka into multiple backends"
9+
ThisBuild / homepage := Some(url(gitRepoUrl))
10+
11+
ThisBuild / licenses := List(
12+
"MPL-2.0" -> url("http://mozilla.org/MPL/2.0/")
13+
)
14+
15+
ThisBuild / developers := List(
16+
Developer(
17+
id = "sauliusvl",
18+
name = "Saulius Valatka",
19+
email = "saulius.vl@gmail.com",
20+
url = url("https://github.com/sauliusvl")
21+
)
22+
)
23+
24+
ThisBuild / scmInfo := Some(
25+
ScmInfo(url(gitRepoUrl), s"scm:git:git@github.com:$gitRepo.git")
26+
)
27+
28+
// Remove all additional repository other than Maven Central from POM
29+
ThisBuild / pomIncludeRepository := { _ => false }
30+
ThisBuild / publishMavenStyle := true
31+
32+
// Use Central Portal instead of OSSRH
33+
ThisBuild / publishTo := {
34+
val centralSnapshots = "https://central.sonatype.com/repository/maven-snapshots/"
35+
if (isSnapshot.value) Some("central-snapshots" at centralSnapshots)
36+
else localStaging.value
37+
}

stream-loader-tests/src/test/scala/com/adform/streamloader/VerticaIntegrationTests.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import com.adform.streamloader.behaviors.BasicLoaderBehaviors
1212
import com.adform.streamloader.fixtures._
1313
import com.adform.streamloader.storage._
1414
import com.zaxxer.hikari.{HikariConfig, HikariDataSource}
15+
import org.scalatest.Ignore
1516
import org.scalatest.concurrent.Eventually
1617
import org.scalatest.funspec.AnyFunSpec
1718
import org.scalatest.matchers.should.Matchers
@@ -21,6 +22,9 @@ import org.scalatestplus.scalacheck.Checkers
2122
import scala.concurrent.ExecutionContext
2223

2324
@Slow
25+
// Temporarily ignore Vertica tests, vertica-ce image is not available on DockerHub
26+
// https://github.com/vertica/vertica-containers/issues/64
27+
@Ignore
2428
class VerticaIntegrationTests
2529
extends AnyFunSpec
2630
with Matchers

0 commit comments

Comments
 (0)