|
427 | 427 | <!-- For this profile, we'll get dependencies from maven central --> |
428 | 428 | <repositories></repositories> |
429 | 429 |
|
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 --> |
444 | 431 |
|
445 | 432 | <build> |
446 | 433 | <plugins> |
| 434 | + <!-- Remove nexus-staging-maven-plugin --> |
| 435 | + |
| 436 | + <!-- New: official Central Publishing Plugin --> |
447 | 437 | <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 --> |
450 | 441 | <extensions>true</extensions> |
451 | 442 | <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 --> |
456 | 446 | </configuration> |
457 | 447 | </plugin> |
| 448 | + |
| 449 | + <!-- Keep GPG signing (still required) --> |
458 | 450 | <plugin> |
459 | 451 | <groupId>org.apache.maven.plugins</groupId> |
460 | 452 | <artifactId>maven-gpg-plugin</artifactId> |
|
0 commit comments