Skip to content

Commit 2ed8648

Browse files
committed
Switch to Sonatype Central Publishing
[resolves #299] Signed-off-by: Mark Paluch <[email protected]>
1 parent 28e24aa commit 2ed8648

8 files changed

Lines changed: 48 additions & 46 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ jobs:
2121
- os: macos-latest
2222
mvn: ./mvnw
2323
steps:
24-
- uses: actions/checkout@v3
25-
- name: Set up JDK 1.8
26-
uses: actions/setup-java@v3
24+
- uses: actions/checkout@v5
25+
- name: Set up Java
26+
uses: actions/setup-java@v5
2727
with:
28-
java-version: 8
28+
java-version: 24
2929
distribution: temurin
3030
cache: maven
3131
- name: Build with Maven
3232
env:
33-
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
34-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
33+
CENTRAL_TOKEN_USERNAME: ${{ secrets.CENTRAL_TOKEN_USERNAME }}
34+
CENTRAL_TOKEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN_PASSWORD }}
3535
run: ${{ matrix.mvn }} -B deploy -D skipITs -P snapshot -s settings.xml

.github/workflows/pullrequests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ jobs:
1818
- os: macos-latest
1919
mvn: ./mvnw
2020
steps:
21-
- uses: actions/checkout@v3
22-
- name: Set up JDK 1.8
23-
uses: actions/setup-java@v3
21+
- uses: actions/checkout@v5
22+
- name: Set up Java
23+
uses: actions/setup-java@v5
2424
with:
25-
java-version: 8
25+
java-version: 24
2626
distribution: temurin
2727
cache: maven
2828
- name: Build with Maven

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@ jobs:
1212
if: github.repository == 'r2dbc/r2dbc-mssql'
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v3
16-
- name: Set up JDK 1.8
17-
uses: actions/setup-java@v3
15+
- uses: actions/checkout@v5
16+
- name: Set up Java
17+
uses: actions/setup-java@v5
1818
with:
19-
java-version: 8
19+
java-version: 24
2020
distribution: temurin
2121
- name: Initialize Maven Version
2222
run: ./mvnw -q org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version
2323
- name: GPG Check
2424
run: gpg -k
2525
- name: Release with Maven
2626
env:
27-
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
28-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
27+
CENTRAL_TOKEN_USERNAME: ${{ secrets.CENTRAL_TOKEN_USERNAME }}
28+
CENTRAL_TOKEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN_PASSWORD }}
2929
GPG_KEY_BASE64: ${{ secrets.GPG_KEY_BASE64 }}
3030
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
3131
run: ci/build-and-deploy-to-maven-central.sh
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip
1+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Reactive Relational Database Connectivity Microsoft SQL Server Implementation [![Java CI with Maven](https://github.com/r2dbc/r2dbc-mssql/workflows/Java%20CI%20with%20Maven/badge.svg?branch=main)](https://github.com/r2dbc/r2dbc-mssql/actions?query=workflow%3A%22Java+CI+with+Maven%22+branch%3Amain) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.r2dbc/r2dbc-mssql/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.r2dbc/r2dbc-mssql)
1+
# Reactive Relational Database Connectivity Microsoft SQL Server Implementation [![Java CI with Maven](https://github.com/r2dbc/r2dbc-mssql/actions/workflows/ci.yml/badge.svg)](https://github.com/r2dbc/r2dbc-mssql/actions/workflows/ci.yml) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.r2dbc/r2dbc-mssql/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.r2dbc/r2dbc-mssql)
22

33

44
This project contains the [Microsoft SQL Server][m] implementation of the [R2DBC SPI][r]. This implementation is not intended to be used directly, but rather to be used as the backing implementation for a humane client library to delegate to
@@ -126,7 +126,7 @@ Binding also allows positional index (zero-based) references. The parameter inde
126126

127127
### Maven configuration
128128

129-
Artifacts can be found on [Maven Central](https://search.maven.org/search?q=r2dbc-mssql).
129+
Artifacts can be found on [Maven Central](https://central.sonatype.com/search?q=r2dbc-mssql).
130130

131131
```xml
132132
<dependency>
@@ -146,9 +146,9 @@ If you'd rather like the latest snapshots of the upcoming major version, use our
146146
</dependency>
147147

148148
<repository>
149-
<id>sonatype-nexus-snapshots</id>
150-
<name>Sonatype OSS Snapshot Repository</name>
151-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
149+
<id>central-portal-snapshots</id>
150+
<name>Central Portal Snapshots</name>
151+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
152152
</repository>
153153
```
154154

ci/build-and-deploy-to-maven-central.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ if [[ $VERSION =~ [^(\d+\.)+(RC(\d+)|M(\d+)|RELEASE)$] ]] ; then
2323
#
2424
# Stage on Maven Central
2525
#
26-
echo "Staging $VERSION to Maven Central"
26+
echo "Staging $VERSION to Central Portal"
2727

2828
./mvnw \
2929
-s settings.xml \

pom.xml

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,7 @@
212212
<version>3.11.0</version>
213213
<configuration>
214214
<showWarnings>true</showWarnings>
215-
<source>${java.version}</source>
216-
<target>${java.version}</target>
215+
<release>8</release>
217216
</configuration>
218217
</plugin>
219218
<plugin>
@@ -272,6 +271,8 @@
272271
<link>https://projectreactor.io/docs/core/release/api/</link>
273272
<link>https://www.reactive-streams.org/reactive-streams-1.0.4-javadoc/</link>
274273
</links>
274+
<doclint>-missing</doclint>
275+
<javadocVersion>1.8</javadocVersion>
275276
</configuration>
276277
<executions>
277278
<execution>
@@ -362,6 +363,15 @@
362363
</execution>
363364
</executions>
364365
</plugin>
366+
<plugin>
367+
<groupId>org.sonatype.central</groupId>
368+
<artifactId>central-publishing-maven-plugin</artifactId>
369+
<version>0.8.0</version>
370+
<extensions>true</extensions>
371+
<configuration>
372+
<publishingServerId>central</publishingServerId>
373+
</configuration>
374+
</plugin>
365375
</plugins>
366376
<resources>
367377
<resource>
@@ -475,12 +485,14 @@
475485

476486
<profile>
477487
<id>snapshot</id>
478-
<distributionManagement>
479-
<snapshotRepository>
480-
<id>sonatype</id>
481-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
482-
</snapshotRepository>
483-
</distributionManagement>
488+
<build>
489+
<plugins>
490+
<plugin>
491+
<groupId>org.sonatype.central</groupId>
492+
<artifactId>central-publishing-maven-plugin</artifactId>
493+
</plugin>
494+
</plugins>
495+
</build>
484496
</profile>
485497

486498
<profile>
@@ -512,19 +524,9 @@
512524
</executions>
513525
</plugin>
514526

515-
<!-- Deploy to Sonatype OSS Nexus -->
516-
517527
<plugin>
518-
<groupId>org.sonatype.plugins</groupId>
519-
<artifactId>nexus-staging-maven-plugin</artifactId>
520-
<version>1.6.13</version>
521-
<extensions>true</extensions>
522-
<configuration>
523-
<serverId>sonatype</serverId>
524-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
525-
<autoReleaseAfterClose>false</autoReleaseAfterClose>
526-
<keepStagingRepositoryOnFailure>true</keepStagingRepositoryOnFailure>
527-
</configuration>
528+
<groupId>org.sonatype.central</groupId>
529+
<artifactId>central-publishing-maven-plugin</artifactId>
528530
</plugin>
529531
</plugins>
530532

settings.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
<servers>
66
<server>
7-
<id>sonatype</id>
8-
<username>${env.SONATYPE_USER}</username>
9-
<password>${env.SONATYPE_PASSWORD}</password>
7+
<id>central</id>
8+
<username>${env.CENTRAL_TOKEN_USERNAME}</username>
9+
<password>${env.CENTRAL_TOKEN_PASSWORD}</password>
1010
</server>
1111
</servers>
1212
</settings>

0 commit comments

Comments
 (0)