|
39 | 39 | <tag>5.3.0</tag> |
40 | 40 | </scm> |
41 | 41 |
|
42 | | - <distributionManagement> |
43 | | - <snapshotRepository> |
44 | | - <id>ossrh</id> |
45 | | - <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url> |
46 | | - </snapshotRepository> |
47 | | - <repository> |
48 | | - <id>ossrh</id> |
49 | | - <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url> |
50 | | - </repository> |
51 | | - </distributionManagement> |
52 | | - |
53 | 42 | <properties> |
54 | 43 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
55 | 44 | <project.reporting.sourceEncoding>UTF-8</project.reporting.sourceEncoding> |
|
366 | 355 | <plugin> |
367 | 356 | <groupId>org.apache.maven.plugins</groupId> |
368 | 357 | <artifactId>maven-gpg-plugin</artifactId> |
369 | | - <version>1.6</version> |
| 358 | + <version>3.2.8</version> |
370 | 359 | <executions> |
371 | 360 | <execution> |
372 | 361 | <id>sign-artifacts</id> |
|
375 | 364 | <goal>sign</goal> |
376 | 365 | </goals> |
377 | 366 | <configuration> |
| 367 | + <!-- ${gpg.keyname} is set in settings.xml from settings.tar.gpg archive --> |
378 | 368 | <useAgent>true</useAgent> |
379 | | - <keyname>${gpg.keyname}</keyname> |
380 | | - <passphraseServerId>${gpg.keyname}</passphraseServerId> |
| 369 | + <bestPractices>true</bestPractices> |
381 | 370 | <gpgArguments> |
382 | 371 | <arg>--batch</arg> |
383 | 372 | <arg>--pinentry-mode</arg> |
|
395 | 384 | <artifactId>maven-install-plugin</artifactId> |
396 | 385 | <version>3.0.0-M1</version> |
397 | 386 | </plugin> |
| 387 | + |
| 388 | + <!-- Maven includes maven-deploy-plugin by default, but we want to delegate --> |
| 389 | + <!-- deployement to a third-party plugin. We add this entry to override <skip> --> |
| 390 | + <!-- and ensure we dont' accidentaily publish twice. --> |
398 | 391 | <plugin> |
399 | 392 | <artifactId>maven-deploy-plugin</artifactId> |
400 | 393 | <version>3.0.0-M1</version> |
401 | 394 | <configuration> |
402 | 395 | <skip>true</skip> |
403 | 396 | </configuration> |
404 | 397 | </plugin> |
| 398 | + |
405 | 399 | <plugin> |
406 | | - <groupId>org.sonatype.plugins</groupId> |
407 | | - <artifactId>nexus-staging-maven-plugin</artifactId> |
408 | | - <version>1.6.13</version> |
| 400 | + <groupId>org.sonatype.central</groupId> |
| 401 | + <artifactId>central-publishing-maven-plugin</artifactId> |
| 402 | + <version>0.8.0</version> |
409 | 403 | <extensions>true</extensions> |
410 | | - <executions> |
411 | | - <execution> |
412 | | - <id>default-deploy</id> |
413 | | - <phase>deploy</phase> |
414 | | - <goals> |
415 | | - <goal>deploy</goal> |
416 | | - </goals> |
417 | | - </execution> |
418 | | - </executions> |
419 | 404 | <configuration> |
420 | | - <serverId>ossrh</serverId> |
421 | | - <nexusUrl>https://s01.oss.sonatype.org</nexusUrl> |
422 | | - <autoReleaseAfterClose>true</autoReleaseAfterClose> |
| 405 | + <!-- Auto-publishing is disabled by default to prevent accidental deployments. --> |
| 406 | + <!-- When testing, it is therefore safe to run `mvn deploy` from your local machine, --> |
| 407 | + <!-- as publishing will require manual action. --> |
| 408 | + <!-- In CI we override this option to true and waitUtil=published. --> |
| 409 | + <autoPublish>${central-publishing.autoPublish}</autoPublish> |
| 410 | + <waitUntil>${central-publishing.waitUntil}</waitUntil> |
423 | 411 | </configuration> |
424 | 412 | </plugin> |
| 413 | + |
425 | 414 | <plugin> |
426 | 415 | <artifactId>maven-site-plugin</artifactId> |
427 | 416 | <version>3.9.1</version> |
|
458 | 447 | <artifactId>maven-gpg-plugin</artifactId> |
459 | 448 | </plugin> |
460 | 449 | <plugin> |
461 | | - <groupId>org.sonatype.plugins</groupId> |
462 | | - <artifactId>nexus-staging-maven-plugin</artifactId> |
| 450 | + <groupId>org.sonatype.central</groupId> |
| 451 | + <artifactId>central-publishing-maven-plugin</artifactId> |
463 | 452 | </plugin> |
464 | 453 | </plugins> |
465 | 454 | </build> |
|
0 commit comments