Skip to content

Commit c751d8f

Browse files
committed
Switch to Sonatype Central Publishing.
[resolves #681]
1 parent bda42db commit c751d8f

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

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

150150
### Maven configuration
151151

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

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

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

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
@@ -267,8 +267,7 @@
267267
<arg>-Xlint:-serial</arg>
268268
</compilerArgs>
269269
<showWarnings>true</showWarnings>
270-
<source>${java.version}</source>
271-
<target>${java.version}</target>
270+
<release>8</release>
272271
</configuration>
273272
</plugin>
274273
<plugin>
@@ -327,6 +326,8 @@
327326
<link>https://projectreactor.io/docs/core/release/api/</link>
328327
<link>https://www.reactive-streams.org/reactive-streams-1.0.3-javadoc/</link>
329328
</links>
329+
<doclint>-missing</doclint>
330+
<javadocVersion>1.8</javadocVersion>
330331
</configuration>
331332
<executions>
332333
<execution>
@@ -421,6 +422,15 @@
421422
</execution>
422423
</executions>
423424
</plugin>
425+
<plugin>
426+
<groupId>org.sonatype.central</groupId>
427+
<artifactId>central-publishing-maven-plugin</artifactId>
428+
<version>0.8.0</version>
429+
<extensions>true</extensions>
430+
<configuration>
431+
<publishingServerId>central</publishingServerId>
432+
</configuration>
433+
</plugin>
424434
</plugins>
425435
<resources>
426436
<resource>
@@ -534,12 +544,14 @@
534544

535545
<profile>
536546
<id>snapshot</id>
537-
<distributionManagement>
538-
<snapshotRepository>
539-
<id>sonatype</id>
540-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
541-
</snapshotRepository>
542-
</distributionManagement>
547+
<build>
548+
<plugins>
549+
<plugin>
550+
<groupId>org.sonatype.central</groupId>
551+
<artifactId>central-publishing-maven-plugin</artifactId>
552+
</plugin>
553+
</plugins>
554+
</build>
543555
</profile>
544556

545557
<profile>
@@ -571,20 +583,6 @@
571583
</executions>
572584
</plugin>
573585

574-
<!-- Deploy to Sonatype OSS Nexus -->
575-
576-
<plugin>
577-
<groupId>org.sonatype.plugins</groupId>
578-
<artifactId>nexus-staging-maven-plugin</artifactId>
579-
<version>1.6.13</version>
580-
<extensions>true</extensions>
581-
<configuration>
582-
<serverId>sonatype</serverId>
583-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
584-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
585-
<keepStagingRepositoryOnFailure>true</keepStagingRepositoryOnFailure>
586-
</configuration>
587-
</plugin>
588586
</plugins>
589587

590588
</pluginManagement>
@@ -597,8 +595,8 @@
597595
</plugin>
598596

599597
<plugin>
600-
<groupId>org.sonatype.plugins</groupId>
601-
<artifactId>nexus-staging-maven-plugin</artifactId>
598+
<groupId>org.sonatype.central</groupId>
599+
<artifactId>central-publishing-maven-plugin</artifactId>
602600
</plugin>
603601

604602
</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)