Skip to content

Commit af01385

Browse files
committed
Fix maven central publishing CTR
Fixes #4828 Signed-off-by: Oleksandr Porunov <alexandr.porunov@gmail.com>
1 parent 75da6ce commit af01385

File tree

4 files changed

+12
-15
lines changed

4 files changed

+12
-15
lines changed

.github/workflows/ci-publish-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
run: |
7474
mkdir -p ~/.m2/
7575
echo "<settingsSecurity><master>$MASTER_PASSWORD</master></settingsSecurity>" > ~/.m2/settings-security.xml
76-
echo "<settings><servers><server><id>ossrh</id><username>$OSSRH_USERNAME</username><password>$OSSRH_PASSWORD</password></server></servers></settings>" > ~/.m2/settings.xml
76+
echo "<settings><servers><server><id>central</id><username>$OSSRH_USERNAME</username><password>$OSSRH_PASSWORD</password></server></servers></settings>" > ~/.m2/settings.xml
7777
env:
7878
MASTER_PASSWORD: ${{ secrets.MASTER_PASSWORD }}
7979
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}

.github/workflows/ci-publish-official.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
run: |
7575
mkdir -p ~/.m2/
7676
echo "<settingsSecurity><master>$MASTER_PASSWORD</master></settingsSecurity>" > ~/.m2/settings-security.xml
77-
echo "<settings><servers><server><id>ossrh</id><username>$OSSRH_USERNAME</username><password>$OSSRH_PASSWORD</password></server></servers></settings>" > ~/.m2/settings.xml
77+
echo "<settings><servers><server><id>central</id><username>$OSSRH_USERNAME</username><password>$OSSRH_PASSWORD</password></server></servers></settings>" > ~/.m2/settings.xml
7878
env:
7979
MASTER_PASSWORD: ${{ secrets.MASTER_PASSWORD }}
8080
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}

RELEASING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Steps below were taken from [this guide.](https://maven.apache.org/guides/mini/g
101101
<settings>
102102
<servers>
103103
<server>
104-
<id>ossrh</id>
104+
<id>central</id>
105105
<username>{sonatype username}</username>
106106
<password>{encrypted sonatype password}</password>
107107
</server>
@@ -120,7 +120,7 @@ Otherwise, you will have to type in your gpg passphrase many times when prompted
120120
<settings>
121121
<servers>
122122
<server>
123-
<id>ossrh</id>
123+
<id>central</id>
124124
<username>{sonatype username}</username>
125125
<password>{encrypted sonatype password}</password>
126126
</server>

pom.xml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,8 @@
4747
<distributionManagement>
4848
<snapshotRepository>
4949
<id>ossrh</id>
50-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
50+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
5151
</snapshotRepository>
52-
<repository>
53-
<id>ossrh</id>
54-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
55-
</repository>
5652
</distributionManagement>
5753
<properties>
5854
<titan.compatible-versions>1.0.0,1.1.0-SNAPSHOT</titan.compatible-versions>
@@ -1559,15 +1555,16 @@
15591555
<build>
15601556
<plugins>
15611557
<plugin>
1562-
<groupId>org.sonatype.plugins</groupId>
1563-
<artifactId>nexus-staging-maven-plugin</artifactId>
1564-
<version>1.7.0</version>
1558+
<groupId>org.sonatype.central</groupId>
1559+
<artifactId>central-publishing-maven-plugin</artifactId>
1560+
<version>0.8.0</version>
15651561
<extensions>true</extensions>
15661562
<configuration>
1567-
<!-- The Base URL of Nexus instance where we want to stage -->
1568-
<nexusUrl>https://oss.sonatype.org</nexusUrl>
15691563
<!-- The server "id" element from settings to use authentication from -->
1570-
<serverId>ossrh</serverId>
1564+
<publishingServerId>central</publishingServerId>
1565+
<autoPublish>true</autoPublish>
1566+
<waitUntil>published</waitUntil>
1567+
<waitMaxTime>3600</waitMaxTime>
15711568
</configuration>
15721569
</plugin>
15731570
</plugins>

0 commit comments

Comments
 (0)