Skip to content

Commit b5e9bb4

Browse files
committed
patch: fix publishing
1 parent e5db6db commit b5e9bb4

File tree

1 file changed

+12
-20
lines changed

1 file changed

+12
-20
lines changed

pom.xml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -427,34 +427,26 @@
427427
<!-- For this profile, we'll get dependencies from maven central -->
428428
<repositories></repositories>
429429

430-
<distributionManagement>
431-
<repository>
432-
<!-- This is where the nexus staging plugin will publish artifacts -->
433-
<id>central</id>
434-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2</url>
435-
</repository>
436-
<!-- Optional: add snapshots if you publish SNAPSHOT versions -->
437-
<!--
438-
<snapshotRepository>
439-
<id>central</id>
440-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
441-
</snapshotRepository>
442-
-->
443-
</distributionManagement>
430+
<!-- No <distributionManagement> needed – the plugin handles upload -->
444431

445432
<build>
446433
<plugins>
434+
<!-- Remove nexus-staging-maven-plugin -->
435+
436+
<!-- New: official Central Publishing Plugin -->
447437
<plugin>
448-
<groupId>org.sonatype.plugins</groupId>
449-
<artifactId>nexus-staging-maven-plugin</artifactId>
438+
<groupId>org.sonatype.central</groupId>
439+
<artifactId>central-publishing-maven-plugin</artifactId>
440+
<version>0.9.0</version> <!-- or latest; check https://central.sonatype.com/artifact/org.sonatype.central/central-publishing-maven-plugin -->
450441
<extensions>true</extensions>
451442
<configuration>
452-
<serverId>central</serverId>
453-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
454-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
455-
<keepStagingRepositoryOnCloseRuleFailure>true</keepStagingRepositoryOnCloseRuleFailure>
443+
<publishingServerId>central</publishingServerId> <!-- match settings.xml <id> -->
444+
<autoPublish>true</autoPublish> <!-- auto-approve & release after validation -->
445+
<waitUntil>published</waitUntil> <!-- wait for sync to Central -->
456446
</configuration>
457447
</plugin>
448+
449+
<!-- Keep GPG signing (still required) -->
458450
<plugin>
459451
<groupId>org.apache.maven.plugins</groupId>
460452
<artifactId>maven-gpg-plugin</artifactId>

0 commit comments

Comments
 (0)