|
51 | 51 | </licenses> |
52 | 52 |
|
53 | 53 | <repositories> |
54 | | - <repository> |
55 | | - <id>ossrh</id> |
56 | | - <url>https://oss.sonatype.org/content/repositories/snapshots</url> |
57 | | - <snapshots> |
58 | | - <enabled>true</enabled> |
59 | | - <updatePolicy>daily</updatePolicy> |
60 | | - </snapshots> |
61 | | - </repository> |
62 | 54 | <repository> |
63 | 55 | <id>github</id> |
64 | 56 | <url>https://maven.pkg.github.com/opencb</url> |
|
305 | 297 | </plugins> |
306 | 298 | </build> |
307 | 299 |
|
| 300 | + |
308 | 301 | <profiles> |
309 | 302 | <profile> |
310 | 303 | <id>deploy-maven</id> |
311 | 304 | <distributionManagement> |
| 305 | + <!-- Releases repository using the Sonatype OSSRH Staging API for staging and deployment --> |
312 | 306 | <repository> |
313 | 307 | <id>ossrh</id> |
314 | | - <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> |
| 308 | + <name>OSSRH Staging API Releases</name> |
| 309 | + <url>https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/</url> |
315 | 310 | </repository> |
| 311 | + |
| 312 | + <!-- Snapshots repository pointing to Maven Central’s snapshot feed for ongoing development versions --> |
316 | 313 | <snapshotRepository> |
317 | 314 | <id>ossrh</id> |
318 | | - <url>https://oss.sonatype.org/content/repositories/snapshots</url> |
| 315 | + <name>Central Portal Snapshots</name> |
| 316 | + <url>https://central.sonatype.com/repository/maven-snapshots/</url> |
319 | 317 | </snapshotRepository> |
320 | 318 | </distributionManagement> |
321 | 319 | <build> |
322 | 320 | <plugins> |
| 321 | + <!-- Central Publishing Plugin: handles both snapshots and releases via the Sonatype Central API --> |
| 322 | + <plugin> |
| 323 | + <groupId>org.sonatype.central</groupId> |
| 324 | + <artifactId>central-publishing-maven-plugin</artifactId> |
| 325 | + <version>0.8.0</version> |
| 326 | + <!-- extensions=true allows this plugin to hook into the build lifecycle --> |
| 327 | + <extensions>true</extensions> |
| 328 | + <configuration> |
| 329 | + <!-- ID of the <server> in your settings.xml containing your Sonatype credentials --> |
| 330 | + <publishingServerId>ossrh</publishingServerId> |
| 331 | + <!-- autoPublish=true will automatically close and release the staging repository after deploy --> |
| 332 | + <autoPublish>true</autoPublish> |
| 333 | + <!-- waitUntil=published makes the build wait until the artifacts are fully available in Central --> |
| 334 | + <waitUntil>published</waitUntil> |
| 335 | + <!-- ignorePublishedComponents skips already-published modules in multimodule builds --> |
| 336 | + <ignorePublishedComponents>true</ignorePublishedComponents> |
| 337 | + </configuration> |
| 338 | + </plugin> |
| 339 | + <!-- Source Plugin: generates and attaches a -sources.jar containing all your project’s source files --> |
323 | 340 | <plugin> |
324 | 341 | <groupId>org.apache.maven.plugins</groupId> |
325 | 342 | <artifactId>maven-source-plugin</artifactId> |
326 | | - <version>3.2.0</version> |
| 343 | + <version>3.2.1</version> |
327 | 344 | <executions> |
328 | 345 | <execution> |
329 | 346 | <id>attach-sources</id> |
330 | 347 | <goals> |
| 348 | + <!-- jar-no-fork: create the sources jar without running the default lifecycle again --> |
331 | 349 | <goal>jar-no-fork</goal> |
332 | 350 | </goals> |
333 | 351 | </execution> |
334 | 352 | </executions> |
335 | 353 | </plugin> |
| 354 | + |
| 355 | + <!-- Javadoc Plugin: generates and attaches a -javadoc.jar containing your project’s API documentation --> |
336 | 356 | <plugin> |
337 | 357 | <groupId>org.apache.maven.plugins</groupId> |
338 | 358 | <artifactId>maven-javadoc-plugin</artifactId> |
|
341 | 361 | <execution> |
342 | 362 | <id>attach-javadocs</id> |
343 | 363 | <goals> |
| 364 | + <!-- jar: package the generated Javadocs into a jar file --> |
344 | 365 | <goal>jar</goal> |
345 | 366 | </goals> |
346 | 367 | </execution> |
347 | 368 | </executions> |
348 | 369 | <configuration> |
| 370 | + <!-- disable strict checking of HTML tags in comments --> |
349 | 371 | <doclint>none</doclint> |
| 372 | + <!-- do not fail the build if Javadoc generation issues errors --> |
| 373 | + <failOnError>false</failOnError> |
350 | 374 | </configuration> |
351 | 375 | </plugin> |
| 376 | + |
| 377 | + <!-- GPG Plugin: signs all deployable artifacts (.jar, .pom, sources, javadoc) with your GPG key --> |
352 | 378 | <plugin> |
353 | 379 | <groupId>org.apache.maven.plugins</groupId> |
354 | 380 | <artifactId>maven-gpg-plugin</artifactId> |
355 | 381 | <version>1.6</version> |
356 | 382 | <executions> |
357 | 383 | <execution> |
358 | 384 | <id>sign-artifacts</id> |
359 | | - <phase>deploy</phase> |
| 385 | + <!-- bind signing to the verify phase, so signatures are created before deploy --> |
| 386 | + <phase>verify</phase> |
360 | 387 | <goals> |
361 | 388 | <goal>sign</goal> |
362 | 389 | </goals> |
363 | 390 | <configuration> |
364 | | - <!-- Prevent `gpg` from using pinentry programs --> |
| 391 | + <!-- Use loopback pinentry to allow unattended signing in CI --> |
365 | 392 | <gpgArguments> |
366 | 393 | <arg>--pinentry-mode</arg> |
367 | 394 | <arg>loopback</arg> |
|
370 | 397 | </execution> |
371 | 398 | </executions> |
372 | 399 | </plugin> |
373 | | - <plugin> |
374 | | - <groupId>org.sonatype.plugins</groupId> |
375 | | - <artifactId>nexus-staging-maven-plugin</artifactId> |
376 | | - <version>1.6.8</version> |
377 | | - <extensions>true</extensions> |
378 | | - <configuration> |
379 | | - <serverId>ossrh</serverId> |
380 | | - <nexusUrl>https://oss.sonatype.org/</nexusUrl> |
381 | | - <autoReleaseAfterClose>true</autoReleaseAfterClose> |
382 | | - </configuration> |
383 | | - </plugin> |
384 | 400 | </plugins> |
385 | 401 | </build> |
386 | 402 | </profile> |
|
0 commit comments