|
104 | 104 |
|
105 | 105 | <!-- Plugins not managed by the JBoss parent POM: --> |
106 | 106 | <maven-wrapper-plugin.version>3.3.2</maven-wrapper-plugin.version> |
107 | | - <nexus-staging.plugin.version>1.7.0</nexus-staging.plugin.version> |
108 | | - <flatten-maven-plugin.version>1.5.0</flatten-maven-plugin.version> |
| 107 | + <flatten-maven-plugin.version>1.7.0</flatten-maven-plugin.version> |
109 | 108 |
|
110 | 109 | <!-- |
111 | 110 | We don't want to publish or sign any modules by default. |
112 | 111 | Specific modules will override the setting at their own level. |
113 | 112 | --> |
114 | 113 | <deploy.skip>true</deploy.skip> |
115 | | - <maven-deploy-plugin.skip>true</maven-deploy-plugin.skip> |
116 | 114 |
|
117 | 115 | <!-- Repository Deployment URLs --> |
118 | | - <ossrh.releases.repo.id>ossrh</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> |
| 116 | + |
| 117 | + <!-- We always publish to a local directory, JReleaser is supposed to take care of publishing to Nexus: --> |
| 118 | + <local.staging.releases.repo.id>staging-deploy</local.staging.releases.repo.id> |
| 119 | + <local.staging.releases.repo.name>Local Staging Directory Releases Repository</local.staging.releases.repo.name> |
| 120 | + <local.staging.releases.repo.url>file:${maven.multiModuleProjectDirectory}/target/staging-deploy/maven</local.staging.releases.repo.url> |
122 | 121 | <ossrh.snapshots.repo.id>ossrh</ossrh.snapshots.repo.id> |
123 | 122 | <ossrh.snapshots.repo.name>Sonatype OSSRH Snapshots</ossrh.snapshots.repo.name> |
124 | 123 | <ossrh.snapshots.repo.url>https://oss.sonatype.org/content/repositories/snapshots</ossrh.snapshots.repo.url> |
|
247 | 246 | </dependencyManagement> |
248 | 247 |
|
249 | 248 | <distributionManagement> |
250 | | - <repository> |
251 | | - <id>${ossrh.releases.repo.id}</id> |
252 | | - <name>${ossrh.releases.repo.name}</name> |
253 | | - <url>${ossrh.releases.repo.url}</url> |
254 | | - </repository> |
255 | | - <snapshotRepository> |
256 | | - <id>${ossrh.snapshots.repo.id}</id> |
257 | | - <name>${ossrh.snapshots.repo.name}</name> |
258 | | - <url>${ossrh.snapshots.repo.url}</url> |
259 | | - </snapshotRepository> |
| 249 | + <repository> |
| 250 | + <id>${local.staging.releases.repo.id}</id> |
| 251 | + <name>${local.staging.releases.repo.name}</name> |
| 252 | + <url>${local.staging.releases.repo.url}</url> |
| 253 | + </repository> |
| 254 | + <snapshotRepository> |
| 255 | + <id>${ossrh.snapshots.repo.id}</id> |
| 256 | + <name>${ossrh.snapshots.repo.name}</name> |
| 257 | + <url>${ossrh.snapshots.repo.url}</url> |
| 258 | + </snapshotRepository> |
260 | 259 | </distributionManagement> |
261 | 260 |
|
262 | 261 | <build> |
|
271 | 270 | <distributionType>bin</distributionType> |
272 | 271 | </configuration> |
273 | 272 | </plugin> |
274 | | - <!-- Published artifacts have to be signed: --> |
275 | | - <plugin> |
276 | | - <groupId>org.apache.maven.plugins</groupId> |
277 | | - <artifactId>maven-gpg-plugin</artifactId> |
278 | | - <executions> |
279 | | - <execution> |
280 | | - <id>sign-artifacts</id> |
281 | | - <phase>verify</phase> |
282 | | - <goals> |
283 | | - <goal>sign</goal> |
284 | | - </goals> |
285 | | - <configuration> |
286 | | - <skip>${deploy.skip}</skip> |
287 | | - <homedir>${env.RELEASE_GPG_HOMEDIR}</homedir> |
288 | | - </configuration> |
289 | | - </execution> |
290 | | - </executions> |
291 | | - </plugin> |
292 | | - <plugin> |
293 | | - <groupId>org.sonatype.plugins</groupId> |
294 | | - <artifactId>nexus-staging-maven-plugin</artifactId> |
295 | | - <version>${nexus-staging.plugin.version}</version> |
296 | | - <extensions>false</extensions><!-- This is essential: do not put true here --> |
297 | | - <configuration> |
298 | | - <skipNexusStagingDeployMojo>${deploy.skip}</skipNexusStagingDeployMojo> |
299 | | - <serverId>${ossrh.releases.repo.id}</serverId> |
300 | | - <!-- The following, by default, is only used for actual releases, not for snapshot deployments --> |
301 | | - <nexusUrl>${ossrh.releases.repo.baseUrl}</nexusUrl> |
302 | | - <!-- oss.sonatype.org has been very slow when closing repositories lately; |
303 | | - let's raise the timeout until we switch to s01.sonatype.org --> |
304 | | - <stagingProgressTimeoutMinutes>60</stagingProgressTimeoutMinutes> |
305 | | - </configuration> |
306 | | - </plugin> |
307 | 273 | <plugin> |
308 | 274 | <groupId>org.codehaus.mojo</groupId> |
309 | 275 | <artifactId>flatten-maven-plugin</artifactId> |
|
334 | 300 | <groupId>org.apache.maven.plugins</groupId> |
335 | 301 | <artifactId>maven-deploy-plugin</artifactId> |
336 | 302 | <configuration> |
337 | | - <skip>${maven-deploy-plugin.skip}</skip> |
| 303 | + <skip>${deploy.skip}</skip> |
338 | 304 | </configuration> |
339 | 305 | </plugin> |
340 | | - <!-- |
341 | | - Configure the nexus-staging-maven-plugin explicitly (without <extension>true</extension>) |
342 | | - in order to work around a problem in the "reports" module (see that module's POM for more info). |
343 | | - --> |
344 | | - <plugin> |
345 | | - <groupId>org.sonatype.plugins</groupId> |
346 | | - <artifactId>nexus-staging-maven-plugin</artifactId> |
347 | | - <executions> |
348 | | - <execution> |
349 | | - <id>default-deploy</id> |
350 | | - <phase>deploy</phase> |
351 | | - <goals> |
352 | | - <!-- |
353 | | - This will only put artifacts in a staging directory. |
354 | | - See the "reports" module for actual deployment, at the end of the build. |
355 | | - --> |
356 | | - <goal>deploy</goal> |
357 | | - </goals> |
358 | | - </execution> |
359 | | - </executions> |
360 | | - </plugin> |
361 | 306 | <plugin> |
362 | 307 | <groupId>org.codehaus.mojo</groupId> |
363 | 308 | <artifactId>flatten-maven-plugin</artifactId> |
|
388 | 333 | </plugins> |
389 | 334 | </build> |
390 | 335 |
|
391 | | - <profiles> |
392 | | - <profile> |
393 | | - <id>release</id> |
394 | | - <activation> |
395 | | - <property> |
396 | | - <name>performRelease</name> |
397 | | - <value>true</value> |
398 | | - </property> |
399 | | - </activation> |
400 | | - <build> |
401 | | - <plugins> |
402 | | - <plugin> |
403 | | - <groupId>org.apache.maven.plugins</groupId> |
404 | | - <artifactId>maven-gpg-plugin</artifactId> |
405 | | - </plugin> |
406 | | - </plugins> |
407 | | - </build> |
408 | | - </profile> |
409 | | - |
410 | | - <!-- |
411 | | - WARNING: this MUST be the very last profile, |
412 | | - so that the "report" module is the very last module, |
413 | | - in particular when deploying artifacts to a Nexus repository. |
414 | | - See the "build/reports" module POM for more information. |
415 | | - --> |
416 | | - <profile> |
417 | | - <id>build-reports-as-last-module</id> |
418 | | - <activation> |
419 | | - <property> |
420 | | - <name>!some.property.that.will.never.exist</name> |
421 | | - </property> |
422 | | - </activation> |
423 | | - <modules> |
424 | | - <module>reports</module> |
425 | | - </modules> |
426 | | - </profile> |
427 | | - |
428 | | - <!-- DO NOT ADD ANY PROFILE AFTER THIS: see above --> |
429 | | - </profiles> |
430 | | - |
431 | 336 | </project> |
0 commit comments