Skip to content

Commit d5b65d1

Browse files
committed
Switch to Sonatype Central Publishing.
Closes #158
1 parent 2e88d02 commit d5b65d1

9 files changed

Lines changed: 54 additions & 73 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ jobs:
2323
# - os: macos-latest
2424
# mvn: ./mvnw
2525
steps:
26-
- uses: actions/checkout@v3
27-
- name: Set up JDK 1.8
28-
uses: actions/setup-java@v3
26+
- uses: actions/checkout@v5
27+
- name: Set up Java
28+
uses: actions/setup-java@v5
2929
with:
30-
java-version: 8
30+
java-version: 24
3131
distribution: temurin
3232
cache: 'maven'
3333
- name: Build with Maven
3434
env:
35-
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
36-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
35+
CENTRAL_TOKEN_USERNAME: ${{ secrets.CENTRAL_TOKEN_USERNAME }}
36+
CENTRAL_TOKEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN_PASSWORD }}
3737
run: ${{ matrix.mvn }} -B deploy -P snapshot -s settings.xml

.github/workflows/publish-docs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
if: github.repository == 'r2dbc/r2dbc-proxy'
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
cache: 'maven'
2222

.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,11 +12,11 @@ jobs:
1212
if: github.repository == 'r2dbc/r2dbc-proxy'
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
cache: 'maven'
2222
- name: Initialize Maven Version
@@ -25,8 +25,8 @@ jobs:
2525
run: gpg -k
2626
- name: Release with Maven
2727
env:
28-
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
29-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
28+
CENTRAL_TOKEN_USERNAME: ${{ secrets.CENTRAL_TOKEN_USERNAME }}
29+
CENTRAL_TOKEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN_PASSWORD }}
3030
GPG_KEY_BASE64: ${{ secrets.GPG_KEY_BASE64 }}
3131
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
3232
run: ci/build-and-deploy-to-maven-central.sh

.mvn/wrapper/maven-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip
17+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip
1818
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar

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 Proxy Framework [![Java CI with Maven](https://github.com/r2dbc/r2dbc-proxy/workflows/Java%20CI%20with%20Maven/badge.svg?branch=main)](https://github.com/r2dbc/r2dbc-proxy/actions?query=workflow%3A%22Java+CI+with+Maven%22+branch%3Amain) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.r2dbc/r2dbc-proxy/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.r2dbc/r2dbc-proxy)
1+
# Reactive Relational Database Connectivity Proxy Framework [![Java CI with Maven](https://github.com/r2dbc/r2dbc-proxy/actions/workflows/ci.yml/badge.svg)](https://github.com/r2dbc/r2dbc-proxy/actions/workflows/ci.yml) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.r2dbc/r2dbc-proxy/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.r2dbc/r2dbc-proxy)
22

33
This project contains the proxy framework of the [R2DBC SPI][r]. R2DBC is a [Reactive Foundation][rf] project.
44

@@ -12,7 +12,7 @@ This project is governed by the [R2DBC Code of Conduct](https://github.com/r2dbc
1212

1313
## Maven configuration
1414

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

1717
```xml
1818
<dependency>
@@ -32,9 +32,9 @@ If you'd rather like the latest snapshots of the upcoming major version, use our
3232
</dependency>
3333

3434
<repository>
35-
<id>sonatype-nexus-snapshots</id>
36-
<name>Sonatype OSS Snapshot Repository</name>
37-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
35+
<id>central-portal-snapshots</id>
36+
<name>Central Portal Snapshots</name>
37+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
3838
</repository>
3939
```
4040

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: 24 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,11 @@
241241
<arg>-Xlint:-options</arg>
242242
<arg>-Xlint:-processing</arg>
243243
<arg>-Xlint:-serial</arg>
244+
<arg>-Xlint:-this-escape</arg>
245+
<arg>-Xlint:-deprecation</arg>
244246
</compilerArgs>
245247
<showWarnings>true</showWarnings>
246-
<source>${java.version}</source>
247-
<target>${java.version}</target>
248+
<release>8</release>
248249
</configuration>
249250
</plugin>
250251
<plugin>
@@ -280,6 +281,8 @@
280281
<link>https://www.reactive-streams.org/reactive-streams-1.0.2-javadoc/</link>
281282
</links>
282283
<notimestamp>true</notimestamp>
284+
<doclint>-missing</doclint>
285+
<javadocVersion>1.8</javadocVersion>
283286
</configuration>
284287
<executions>
285288
<execution>
@@ -406,6 +409,15 @@
406409
</attributes>
407410
</configuration>
408411
</plugin>
412+
<plugin>
413+
<groupId>org.sonatype.central</groupId>
414+
<artifactId>central-publishing-maven-plugin</artifactId>
415+
<version>0.8.0</version>
416+
<extensions>true</extensions>
417+
<configuration>
418+
<publishingServerId>central</publishingServerId>
419+
</configuration>
420+
</plugin>
409421
</plugins>
410422
<resources>
411423
<resource>
@@ -427,12 +439,14 @@
427439

428440
<profile>
429441
<id>snapshot</id>
430-
<distributionManagement>
431-
<snapshotRepository>
432-
<id>sonatype</id>
433-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
434-
</snapshotRepository>
435-
</distributionManagement>
442+
<build>
443+
<plugins>
444+
<plugin>
445+
<groupId>org.sonatype.central</groupId>
446+
<artifactId>central-publishing-maven-plugin</artifactId>
447+
</plugin>
448+
</plugins>
449+
</build>
436450
</profile>
437451

438452
<profile>
@@ -463,21 +477,6 @@
463477
</execution>
464478
</executions>
465479
</plugin>
466-
467-
<!-- Deploy to Sonatype OSS Nexus -->
468-
469-
<plugin>
470-
<groupId>org.sonatype.plugins</groupId>
471-
<artifactId>nexus-staging-maven-plugin</artifactId>
472-
<version>1.6.8</version>
473-
<extensions>true</extensions>
474-
<configuration>
475-
<serverId>sonatype</serverId>
476-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
477-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
478-
<keepStagingRepositoryOnFailure>true</keepStagingRepositoryOnFailure>
479-
</configuration>
480-
</plugin>
481480
</plugins>
482481

483482
</pluginManagement>
@@ -490,34 +489,16 @@
490489
</plugin>
491490

492491
<plugin>
493-
<groupId>org.sonatype.plugins</groupId>
494-
<artifactId>nexus-staging-maven-plugin</artifactId>
492+
<groupId>org.sonatype.central</groupId>
493+
<artifactId>central-publishing-maven-plugin</artifactId>
495494
</plugin>
496495

497496
</plugins>
498497

499498
</build>
500499

501-
<distributionManagement>
502-
<repository>
503-
<id>sonatype</id>
504-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
505-
</repository>
506-
</distributionManagement>
507-
508500
</profile>
509501

510502
</profiles>
511503

512-
<repositories>
513-
<repository>
514-
<id>sonatype-nexus-snapshots</id>
515-
<name>Sonatype OSS Snapshot Repository</name>
516-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
517-
<snapshots>
518-
<enabled>true</enabled>
519-
</snapshots>
520-
</repository>
521-
</repositories>
522-
523504
</project>

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)