Skip to content

Commit e8dd622

Browse files
committed
Switch to Sonatype Central Publishing.
[resolves #681]
1 parent 0947ac8 commit e8dd622

File tree

8 files changed

+48
-50
lines changed

8 files changed

+48
-50
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ jobs:
1212
if: github.repository == 'pgjdbc/r2dbc-postgresql'
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v4
16-
- name: Set up JDK 1.8
17-
uses: actions/setup-java@v4
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
cache: maven
2222
- name: Build with Maven
2323
env:
24-
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
25-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
24+
CENTRAL_TOKEN_USERNAME: ${{ secrets.CENTRAL_TOKEN_USERNAME }}
25+
CENTRAL_TOKEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN_PASSWORD }}
2626
run: ./mvnw -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
@@ -9,11 +9,11 @@ jobs:
99
pr-build:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v4
13-
- name: Set up JDK 1.8
14-
uses: actions/setup-java@v4
12+
- uses: actions/checkout@v5
13+
- name: Set up Java
14+
uses: actions/setup-java@v5
1515
with:
16-
java-version: 8
16+
java-version: 24
1717
distribution: temurin
1818
cache: maven
1919
- 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 == 'pgjdbc/r2dbc-postgresql'
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v4
16-
- name: Set up JDK 1.8
17-
uses: actions/setup-java@v4
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,2 +1,2 @@
1-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-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
22
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# PostgreSQL R2DBC Driver [![Java CI with Maven](https://github.com/pgjdbc/r2dbc-postgresql/workflows/Java%20CI%20with%20Maven/badge.svg?branch=main)](https://github.com/pgjdbc/r2dbc-postgresql/actions?query=workflow%3A%22Java+CI+with+Maven%22+branch%3Amain) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.postgresql/r2dbc-postgresql/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.postgresql/r2dbc-postgresql)
1+
# PostgreSQL R2DBC Driver [![Java CI with Maven](https://github.com/pgjdbc/r2dbc-postgresql/actions/workflows/ci.yml/badge.svg)](https://github.com/pgjdbc/r2dbc-postgresql/actions/workflows/ci.yml) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.postgresql/r2dbc-postgresql/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.postgresql/r2dbc-postgresql)
22

33
This project contains the [PostgreSQL][p] 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.
44

@@ -148,7 +148,7 @@ Binding also allowed positional index (zero-based) references. The parameter in
148148

149149
### Maven configuration
150150

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

153153
```xml
154154
<dependency>
@@ -168,9 +168,9 @@ If you'd rather like the latest snapshots of the upcoming major version, use our
168168
</dependency>
169169

170170
<repository>
171-
<id>sonatype-nexus-snapshots</id>
172-
<name>Sonatype OSS Snapshot Repository</name>
173-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
171+
<id>central-portal-snapshots</id>
172+
<name>Central Portal Snapshots</name>
173+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
174174
</repository>
175175
```
176176

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 & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,7 @@
272272
<arg>-Xlint:-serial</arg>
273273
</compilerArgs>
274274
<showWarnings>true</showWarnings>
275-
<source>${java.version}</source>
276-
<target>${java.version}</target>
275+
<release>8</release>
277276
</configuration>
278277
</plugin>
279278
<plugin>
@@ -332,6 +331,8 @@
332331
<link>https://projectreactor.io/docs/core/release/api/</link>
333332
<link>https://www.reactive-streams.org/reactive-streams-1.0.3-javadoc/</link>
334333
</links>
334+
<doclint>-missing</doclint>
335+
<javadocVersion>1.8</javadocVersion>
335336
</configuration>
336337
<executions>
337338
<execution>
@@ -426,6 +427,15 @@
426427
</execution>
427428
</executions>
428429
</plugin>
430+
<plugin>
431+
<groupId>org.sonatype.central</groupId>
432+
<artifactId>central-publishing-maven-plugin</artifactId>
433+
<version>0.8.0</version>
434+
<extensions>true</extensions>
435+
<configuration>
436+
<publishingServerId>central</publishingServerId>
437+
</configuration>
438+
</plugin>
429439
</plugins>
430440
<resources>
431441
<resource>
@@ -539,12 +549,14 @@
539549

540550
<profile>
541551
<id>snapshot</id>
542-
<distributionManagement>
543-
<snapshotRepository>
544-
<id>sonatype</id>
545-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
546-
</snapshotRepository>
547-
</distributionManagement>
552+
<build>
553+
<plugins>
554+
<plugin>
555+
<groupId>org.sonatype.central</groupId>
556+
<artifactId>central-publishing-maven-plugin</artifactId>
557+
</plugin>
558+
</plugins>
559+
</build>
548560
</profile>
549561

550562
<profile>
@@ -576,20 +588,6 @@
576588
</executions>
577589
</plugin>
578590

579-
<!-- Deploy to Sonatype OSS Nexus -->
580-
581-
<plugin>
582-
<groupId>org.sonatype.plugins</groupId>
583-
<artifactId>nexus-staging-maven-plugin</artifactId>
584-
<version>1.6.13</version>
585-
<extensions>true</extensions>
586-
<configuration>
587-
<serverId>sonatype</serverId>
588-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
589-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
590-
<keepStagingRepositoryOnFailure>true</keepStagingRepositoryOnFailure>
591-
</configuration>
592-
</plugin>
593591
</plugins>
594592

595593
</pluginManagement>
@@ -602,8 +600,8 @@
602600
</plugin>
603601

604602
<plugin>
605-
<groupId>org.sonatype.plugins</groupId>
606-
<artifactId>nexus-staging-maven-plugin</artifactId>
603+
<groupId>org.sonatype.central</groupId>
604+
<artifactId>central-publishing-maven-plugin</artifactId>
607605
</plugin>
608606

609607
</plugins>

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)