|
65 | 65 | <flatten-maven-plugin.version>1.0.1</flatten-maven-plugin.version> |
66 | 66 | <maven-checkstyle-plugin.version>3.0.0</maven-checkstyle-plugin.version> |
67 | 67 | <checkstyle.version>8.14</checkstyle.version> |
| 68 | + <nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version> |
68 | 69 | </properties> |
69 | 70 | <modules> |
70 | 71 | <module>spring-boot-admin-server</module> |
|
358 | 359 | <artifactId>coveralls-maven-plugin</artifactId> |
359 | 360 | <version>${coveralls-maven-plugin.version}</version> |
360 | 361 | </plugin> |
| 362 | + <plugin> |
| 363 | + <groupId>org.sonatype.plugins</groupId> |
| 364 | + <artifactId>nexus-staging-maven-plugin</artifactId> |
| 365 | + <version>${nexus-staging-maven-plugin.version}</version> |
| 366 | + </plugin> |
361 | 367 | </plugins> |
362 | 368 | </pluginManagement> |
363 | 369 | </build> |
|
416 | 422 | <groupId>org.jacoco</groupId> |
417 | 423 | <artifactId>jacoco-maven-plugin</artifactId> |
418 | 424 | <executions> |
419 | | - <!-- Prepares the property pointing to the JaCoCo |
420 | | - runtime agent which is passed as VM argument when Maven the Surefire plugin |
421 | | - is executed. --> |
| 425 | + <!-- Prepares the property pointing to the JaCoCo runtime agent which is passed as |
| 426 | + VM argument when Maven the Surefire plugin is executed. --> |
422 | 427 | <execution> |
423 | 428 | <id>pre-unit-test</id> |
424 | 429 | <goals> |
425 | 430 | <goal>prepare-agent</goal> |
426 | 431 | </goals> |
427 | 432 | </execution> |
428 | | - <!-- Ensures that the code coverage report for |
429 | | - unit tests is created after unit tests have been run. --> |
| 433 | + <!-- Ensures that the code coverage report for unit tests is created after unit tests have |
| 434 | + been run. --> |
430 | 435 | <execution> |
431 | 436 | <id>post-unit-test</id> |
432 | 437 | <phase>test</phase> |
|
440 | 445 | <groupId>org.eluder.coveralls</groupId> |
441 | 446 | <artifactId>coveralls-maven-plugin</artifactId> |
442 | 447 | </plugin> |
| 448 | + |
| 449 | + <!-- We need to deploy using the nexus-staging-maven-plugin specifying a stagingProfileId. This is to |
| 450 | + workaround the problem that travis uploads the artifacts using different ip addresses resulting |
| 451 | + in multiple staging repositories --> |
| 452 | + <plugin> |
| 453 | + <groupId>org.apache.maven.plugins</groupId> |
| 454 | + <artifactId>maven-deploy-plugin</artifactId> |
| 455 | + <configuration> |
| 456 | + <skip>true</skip> |
| 457 | + </configuration> |
| 458 | + </plugin> |
| 459 | + <plugin> |
| 460 | + <groupId>org.sonatype.plugins</groupId> |
| 461 | + <artifactId>nexus-staging-maven-plugin</artifactId> |
| 462 | + <executions> |
| 463 | + <execution> |
| 464 | + <id>default-deploy</id> |
| 465 | + <phase>deploy</phase> |
| 466 | + <goals> |
| 467 | + <goal>deploy</goal> |
| 468 | + </goals> |
| 469 | + </execution> |
| 470 | + </executions> |
| 471 | + <configuration> |
| 472 | + <serverId>${repositoryId}</serverId> |
| 473 | + <nexusUrl>https://oss.sonatype.org</nexusUrl> |
| 474 | + <!-- explicit matching using the staging profile id --> |
| 475 | + <stagingProfileId>1e79a0f1acc1b8</stagingProfileId> |
| 476 | + </configuration> |
| 477 | + </plugin> |
443 | 478 | </plugins> |
444 | 479 | </build> |
445 | 480 | </profile> |
|
0 commit comments