Skip to content

Commit 1ee4c5e

Browse files
committed
chore: migrate to new publish
Signed-off-by: Todd Baert <[email protected]>
1 parent 79a11b2 commit 1ee4c5e

File tree

3 files changed

+25
-21
lines changed

3 files changed

+25
-21
lines changed

.github/workflows/release-please.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ jobs:
3939
java-version: '21'
4040
distribution: 'temurin'
4141
cache: maven
42-
server-id: ossrh
43-
server-username: OSSRH_USERNAME
44-
server-password: OSSRH_PASSWORD
42+
server-id: central
43+
server-username: CENTRAL_USERNAME
44+
server-password: CENTRAL_PASSWORD
4545

4646
- name: Cache local Maven repository
4747
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
@@ -70,5 +70,5 @@ jobs:
7070
mvn --batch-mode --projects $module --settings release/m2-settings.xml -DskipTests clean deploy
7171
done
7272
env:
73-
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
74-
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
73+
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
74+
CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}

pom.xml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@
252252
</argLine>
253253
</configuration>
254254
</plugin>
255-
<!-- End publish to maven central -->
256255
</plugins>
257256
</build>
258257
<profiles>
@@ -281,9 +280,9 @@
281280
</executions>
282281
<configuration>
283282
<skip>${maven.deploy.skip}</skip>
284-
<repository>https://s01.oss.sonatype.org/service/local/repositories/releases/content</repository>
285-
<snapshotRepository>https://s01.oss.sonatype.org/content/repositories/snapshots</snapshotRepository>
286-
<snapshotServerId>ossrh</snapshotServerId>
283+
<repository>https://repo1.maven.org/maven2</repository>
284+
<snapshotRepository>https://central.sonatype.com/repository/maven-snapshots</snapshotRepository>
285+
<snapshotServerId>central</snapshotServerId>
287286
</configuration>
288287
</plugin>
289288

@@ -376,17 +375,17 @@
376375

377376
<!-- Begin publish to maven central -->
378377
<plugin>
379-
<groupId>org.sonatype.plugins</groupId>
380-
<artifactId>nexus-staging-maven-plugin</artifactId>
381-
<version>1.7.0</version>
378+
<groupId>org.sonatype.central</groupId>
379+
<artifactId>central-publishing-maven-plugin</artifactId>
380+
<version>0.8.0</version>
382381
<extensions>true</extensions>
383382
<configuration>
384-
<serverId>ossrh</serverId>
385-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
386-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
387-
<skipNexusStagingDeployMojo>${maven.deploy.skip}</skipNexusStagingDeployMojo>
383+
<publishingServerId>central</publishingServerId>
384+
<autoPublish>true</autoPublish>
385+
<skipPublishing>${maven.deploy.skip}</skipPublishing>
388386
</configuration>
389387
</plugin>
388+
<!-- End publish to maven central -->
390389
</plugins>
391390
</build>
392391
</profile>
@@ -592,12 +591,12 @@
592591

593592
<distributionManagement>
594593
<snapshotRepository>
595-
<id>ossrh</id>
596-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
594+
<id>central</id>
595+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
597596
</snapshotRepository>
598597
<repository>
599-
<id>ossrh</id>
600-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
598+
<id>central</id>
599+
<url>https://repo1.maven.org/maven2/</url>
601600
</repository>
602601
</distributionManagement>
603602
</project>

release/m2-settings.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,10 @@
55
<username>${env.OSSRH_USERNAME}</username>
66
<password>${env.OSSRH_PASSWORD}</password>
77
</server>
8+
<server>
9+
<id>central</id>
10+
<username>${env.CENTRAL_USERNAME}</username>
11+
<password>${env.CENTRAL_PASSWORD}</password>
12+
</server>
813
</servers>
9-
</settings>
14+
</settings>

0 commit comments

Comments
 (0)