|
103 | 103 | <sqlserver.version>9.2.1.jre8</sqlserver.version>
|
104 | 104 | <jakarta.xml.bind-api.version>4.0.0</jakarta.xml.bind-api.version>
|
105 | 105 |
|
| 106 | + <!-- Plugins not managed by the JBoss parent POM: --> |
106 | 107 | <maven-wrapper-plugin.version>3.3.2</maven-wrapper-plugin.version>
|
| 108 | + <nexus-staging.plugin.version>1.7.0</nexus-staging.plugin.version> |
| 109 | + |
| 110 | + <!-- |
| 111 | + We don't want to publish or sign any modules by default. |
| 112 | + Specific modules will override the setting at their own level. |
| 113 | + --> |
| 114 | + <deploy.skip>true</deploy.skip> |
| 115 | + <maven-deploy-plugin.skip>true</maven-deploy-plugin.skip> |
| 116 | + |
| 117 | + <!-- Repository Deployment URLs --> |
| 118 | + <ossrh.releases.repo.id>ossrh-releases-repository</ossrh.releases.repo.id> |
| 119 | + <ossrh.releases.repo.name>Sonatype OSSRH Releases</ossrh.releases.repo.name> |
| 120 | + <ossrh.releases.repo.url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</ossrh.releases.repo.url> |
| 121 | + <ossrh.releases.repo.baseUrl>https://oss.sonatype.org/</ossrh.releases.repo.baseUrl> |
| 122 | + <ossrh.snapshots.repo.id>ossrh-snapshots-repository</ossrh.snapshots.repo.id> |
| 123 | + <ossrh.snapshots.repo.name>Sonatype OSSRH Snapshots</ossrh.snapshots.repo.name> |
| 124 | + <ossrh.snapshots.repo.url>https://oss.sonatype.org/content/repositories/snapshots</ossrh.snapshots.repo.url> |
107 | 125 |
|
108 | 126 | <maven.compiler.target>17</maven.compiler.target>
|
109 | 127 | <maven.compiler.source>17</maven.compiler.source>
|
|
237 | 255 | <snapshots>
|
238 | 256 | <enabled>false</enabled>
|
239 | 257 | </snapshots>
|
240 |
| - <id>ossrh-releases-repository</id> |
241 |
| - <name>Sonatype OSSRH Releases</name> |
242 |
| - <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> |
| 258 | + <id>${ossrh.releases.repo.id}</id> |
| 259 | + <name>${ossrh.releases.repo.name}</name> |
| 260 | + <url>${ossrh.releases.repo.url}/</url> |
243 | 261 | </repository>
|
244 | 262 | <repository>
|
245 | 263 | <snapshots>
|
246 | 264 | <enabled>true</enabled>
|
247 | 265 | </snapshots>
|
248 |
| - <id>ossrh-snapshots-repository</id> |
249 |
| - <name>Sonatype OSSRH Snapshots</name> |
250 |
| - <url>https://oss.sonatype.org/content/repositories/snapshots/</url> |
| 266 | + <id>${ossrh.snapshots.repo.id}</id> |
| 267 | + <name>${ossrh.snapshots.repo.name}</name> |
| 268 | + <url>${ossrh.snapshots.repo.url}</url> |
251 | 269 | </repository>
|
252 | 270 | </repositories>
|
253 | 271 |
|
254 | 272 | <distributionManagement>
|
255 | 273 | <repository>
|
256 |
| - <id>ossrh-releases-repository</id> |
257 |
| - <name>Sonatype OSSRH Releases</name> |
258 |
| - <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> |
| 274 | + <id>${ossrh.releases.repo.id}</id> |
| 275 | + <name>${ossrh.releases.repo.name}</name> |
| 276 | + <url>${ossrh.releases.repo.url}/</url> |
259 | 277 | </repository>
|
260 | 278 | <snapshotRepository>
|
261 |
| - <id>ossrh-snapshots-repository</id> |
262 |
| - <name>Sonatype OSSRH Snapshots</name> |
263 |
| - <url>https://oss.sonatype.org/content/repositories/snapshots/</url> |
| 279 | + <id>${ossrh.snapshots.repo.id}</id> |
| 280 | + <name>${ossrh.snapshots.repo.name}</name> |
| 281 | + <url>${ossrh.snapshots.repo.url}</url> |
264 | 282 | </snapshotRepository>
|
265 | 283 | </distributionManagement>
|
266 | 284 |
|
|
276 | 294 | <distributionType>bin</distributionType>
|
277 | 295 | </configuration>
|
278 | 296 | </plugin>
|
| 297 | + <!-- Published artifacts have to be signed: --> |
| 298 | + <plugin> |
| 299 | + <groupId>org.apache.maven.plugins</groupId> |
| 300 | + <artifactId>maven-gpg-plugin</artifactId> |
| 301 | + <executions> |
| 302 | + <execution> |
| 303 | + <id>sign-artifacts</id> |
| 304 | + <phase>verify</phase> |
| 305 | + <goals> |
| 306 | + <goal>sign</goal> |
| 307 | + </goals> |
| 308 | + <configuration> |
| 309 | + <skip>${deploy.skip}</skip> |
| 310 | + <homedir>${env.RELEASE_GPG_HOMEDIR}</homedir> |
| 311 | + </configuration> |
| 312 | + </execution> |
| 313 | + </executions> |
| 314 | + </plugin> |
| 315 | + <plugin> |
| 316 | + <groupId>org.sonatype.plugins</groupId> |
| 317 | + <artifactId>nexus-staging-maven-plugin</artifactId> |
| 318 | + <version>${nexus-staging.plugin.version}</version> |
| 319 | + <extensions>false</extensions><!-- This is essential: do not put true here --> |
| 320 | + <configuration> |
| 321 | + <skipNexusStagingDeployMojo>${deploy.skip}</skipNexusStagingDeployMojo> |
| 322 | + <serverId>${ossrh.releases.repo.id}</serverId> |
| 323 | + <!-- The following, by default, is only used for actual releases, not for snapshot deployments --> |
| 324 | + <nexusUrl>${ossrh.releases.repo.baseUrl}</nexusUrl> |
| 325 | + <!-- oss.sonatype.org has been very slow when closing repositories lately; |
| 326 | + let's raise the timeout until we switch to s01.sonatype.org --> |
| 327 | + <stagingProgressTimeoutMinutes>60</stagingProgressTimeoutMinutes> |
| 328 | + </configuration> |
| 329 | + </plugin> |
279 | 330 | </plugins>
|
280 | 331 | </pluginManagement>
|
| 332 | + <plugins> |
| 333 | + <!-- Skip the deploy plugin explicitly: we use nexus-staging-maven-plugin instead --> |
| 334 | + <plugin> |
| 335 | + <groupId>org.apache.maven.plugins</groupId> |
| 336 | + <artifactId>maven-gpg-plugin</artifactId> |
| 337 | + </plugin> |
| 338 | + <!-- Skip the deploy plugin explicitly: we use nexus-staging-maven-plugin instead --> |
| 339 | + <plugin> |
| 340 | + <groupId>org.apache.maven.plugins</groupId> |
| 341 | + <artifactId>maven-deploy-plugin</artifactId> |
| 342 | + <configuration> |
| 343 | + <skip>${maven-deploy-plugin.skip}</skip> |
| 344 | + </configuration> |
| 345 | + </plugin> |
| 346 | + <!-- |
| 347 | + Configure the nexus-staging-maven-plugin explicitly (without <extension>true</extension>) |
| 348 | + in order to work around a problem in the "reports" module (see that module's POM for more info). |
| 349 | + --> |
| 350 | + <plugin> |
| 351 | + <groupId>org.sonatype.plugins</groupId> |
| 352 | + <artifactId>nexus-staging-maven-plugin</artifactId> |
| 353 | + <executions> |
| 354 | + <execution> |
| 355 | + <id>default-deploy</id> |
| 356 | + <phase>deploy</phase> |
| 357 | + <goals> |
| 358 | + <!-- |
| 359 | + This will only put artifacts in a staging directory. |
| 360 | + See the "reports" module for actual deployment, at the end of the build. |
| 361 | + --> |
| 362 | + <goal>deploy</goal> |
| 363 | + </goals> |
| 364 | + </execution> |
| 365 | + </executions> |
| 366 | + </plugin> |
| 367 | + </plugins> |
281 | 368 | </build>
|
282 | 369 |
|
| 370 | + <profiles> |
| 371 | + <!-- |
| 372 | + WARNING: this MUST be the very last profile, |
| 373 | + so that the "report" module is the very last module, |
| 374 | + in particular when deploying artifacts to a Nexus repository. |
| 375 | + See the "build/reports" module POM for more information. |
| 376 | + --> |
| 377 | + <profile> |
| 378 | + <id>build-reports-as-last-module</id> |
| 379 | + <activation> |
| 380 | + <property> |
| 381 | + <name>!some.property.that.will.never.exist</name> |
| 382 | + </property> |
| 383 | + </activation> |
| 384 | + <modules> |
| 385 | + <module>reports</module> |
| 386 | + </modules> |
| 387 | + </profile> |
| 388 | + |
| 389 | + <!-- DO NOT ADD ANY PROFILE AFTER THIS: see above --> |
| 390 | + </profiles> |
283 | 391 | </project>
|
0 commit comments