Skip to content

Commit 9ba7b47

Browse files
Switch Maven publishing workflow to Central Publisher Portal (#329)
* Switch to Central Publisher Portal for Maven publishing --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Thomas Turrell-Croft <thomasturrell@users.noreply.github.com>
1 parent 3b4d3f8 commit 9ba7b47

3 files changed

Lines changed: 12 additions & 16 deletions

File tree

.github/workflows/maven-publish-snapshot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
java-version: "17"
2020
distribution: "temurin"
2121
cache: maven
22-
server-id: ossrh
22+
server-id: central
2323
server-username: MAVEN_USERNAME
2424
server-password: MAVEN_PASSWORD
2525

.github/workflows/maven-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
java-version: "17"
1717
distribution: "temurin"
1818
cache: maven
19-
server-id: ossrh
19+
server-id: central
2020
server-username: MAVEN_USERNAME
2121
server-password: MAVEN_PASSWORD
2222
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}

pom.xml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,14 @@
181181
</executions>
182182
</plugin>
183183
<plugin>
184-
<groupId>org.sonatype.plugins</groupId>
185-
<artifactId>nexus-staging-maven-plugin</artifactId>
186-
<version>1.7.0</version>
184+
<groupId>org.sonatype.central</groupId>
185+
<artifactId>central-publishing-maven-plugin</artifactId>
186+
<version>0.6.0</version>
187187
<extensions>true</extensions>
188188
<configuration>
189-
<serverId>ossrh</serverId>
190-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
191-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
189+
<publishingServerId>central</publishingServerId>
190+
<autoPublish>true</autoPublish>
191+
<waitUntil>published</waitUntil>
192192
</configuration>
193193
</plugin>
194194
<plugin>
@@ -301,13 +301,9 @@
301301
</dependencyManagement>
302302
<distributionManagement>
303303
<snapshotRepository>
304-
<id>ossrh</id>
305-
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
304+
<id>central</id>
305+
<url>https://central.sonatype.com/api/v1/publisher/deployments/download/</url>
306306
</snapshotRepository>
307-
<repository>
308-
<id>ossrh</id>
309-
<url>https://ossrh-staging-api.central.sonatype.com/service/local/</url>
310-
</repository>
311307
</distributionManagement>
312308
<profiles>
313309
<profile>
@@ -327,8 +323,8 @@
327323
<artifactId>maven-gpg-plugin</artifactId>
328324
</plugin>
329325
<plugin>
330-
<groupId>org.sonatype.plugins</groupId>
331-
<artifactId>nexus-staging-maven-plugin</artifactId>
326+
<groupId>org.sonatype.central</groupId>
327+
<artifactId>central-publishing-maven-plugin</artifactId>
332328
</plugin>
333329
</plugins>
334330
</build>

0 commit comments

Comments
 (0)