|
25 | 25 | </developer> |
26 | 26 | </developers> |
27 | 27 | <scm> |
28 | | - <connection>scm:git:https://github.com/databricks/databricks-jdbc.git</connection> |
29 | | - <developerConnection>scm:git:https://github.com/databricks/databricks-jdbc.git</developerConnection> |
30 | | - <url>https://github.com/databricks/databricks-jdbc</url> |
| 28 | + <connection>scm:git:https://github.com/databricks/databricks-jdbc.git</connection> |
| 29 | + <developerConnection>scm:git:https://github.com/databricks/databricks-jdbc.git</developerConnection> |
| 30 | + <url>https://github.com/databricks/databricks-jdbc</url> |
31 | 31 | </scm> |
32 | 32 | <issueManagement> |
33 | 33 | <system>GitHub Issues</system> |
34 | 34 | <url>https://github.com/databricks/databricks-jdbc/issues</url> |
35 | 35 | </issueManagement> |
36 | 36 | <distributionManagement> |
37 | 37 | <repository> |
38 | | - <id>ossrh</id> |
39 | | - <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> |
| 38 | + <id>local-test-repo</id> |
| 39 | + <url>file://${project.build.directory}/local-repo</url> |
40 | 40 | </repository> |
41 | 41 | </distributionManagement> |
42 | 42 | <properties> |
|
389 | 389 | </goals> |
390 | 390 | <configuration> |
391 | 391 | <!-- The shaded uber jar is the default jar produced by this build --> |
392 | | - <createDependencyReducedPom>false</createDependencyReducedPom> |
393 | 392 | <shadedArtifactAttached>false</shadedArtifactAttached> |
394 | 393 | <relocations> |
395 | 394 | <relocation> |
|
489 | 488 | </plugins> |
490 | 489 | </build> |
491 | 490 | <profiles> |
| 491 | + <profile> |
| 492 | + <!-- Local deploy for testing --> |
| 493 | + <id>local-deploy</id> |
| 494 | + <build> |
| 495 | + <plugins> |
| 496 | + <plugin> |
| 497 | + <groupId>org.apache.maven.plugins</groupId> |
| 498 | + <artifactId>maven-deploy-plugin</artifactId> |
| 499 | + <version>2.8.2</version> |
| 500 | + <executions> |
| 501 | + <!-- Skip the default deploy execution --> |
| 502 | + <execution> |
| 503 | + <id>skip-default-deploy</id> |
| 504 | + <phase>deploy</phase> |
| 505 | + <goals> |
| 506 | + <goal>deploy</goal> |
| 507 | + </goals> |
| 508 | + <configuration> |
| 509 | + <skip>true</skip> |
| 510 | + </configuration> |
| 511 | + </execution> |
| 512 | + <!-- Use deploy-file goal to deploy with custom POM --> |
| 513 | + <execution> |
| 514 | + <id>deploy-with-custom-pom</id> |
| 515 | + <phase>deploy</phase> |
| 516 | + <goals> |
| 517 | + <goal>deploy-file</goal> |
| 518 | + </goals> |
| 519 | + <configuration> |
| 520 | + <file>${project.build.directory}/${project.build.finalName}.jar</file> |
| 521 | + <pomFile>${project.basedir}/uber-minimal-pom.xml</pomFile> |
| 522 | + <!-- Include other artifacts like sources and javadocs --> |
| 523 | + <files>${project.build.directory}/${project.build.finalName}-thin.jar</files> |
| 524 | + <types>jar</types> |
| 525 | + <classifiers>thin</classifiers> |
| 526 | + <!-- Use repository details from distributionManagement --> |
| 527 | + <repositoryId>local-test-repo</repositoryId> |
| 528 | + <url>file://${project.build.directory}/local-repo</url> |
| 529 | + </configuration> |
| 530 | + </execution> |
| 531 | + </executions> |
| 532 | + </plugin> |
| 533 | + </plugins> |
| 534 | + </build> |
| 535 | + </profile> |
492 | 536 | <profile> |
493 | 537 | <id>release</id> |
494 | 538 | <build> |
|
527 | 571 | <groupId>org.apache.maven.plugins</groupId> |
528 | 572 | <artifactId>maven-gpg-plugin</artifactId> |
529 | 573 | <version>1.6</version> |
530 | | - <configuration> |
531 | | - <!-- Prevent gpg from using pinentry programs --> |
532 | | - <gpgArguments> |
533 | | - <arg>--pinentry-mode</arg> |
534 | | - <arg>loopback</arg> |
535 | | - </gpgArguments> |
536 | | - </configuration> |
537 | 574 | <executions> |
538 | 575 | <execution> |
539 | | - <id>sign-artifacts</id> |
540 | 576 | <goals> |
541 | | - <goal>sign</goal> |
| 577 | + <!-- Refer: https://maven.apache.org/plugins/maven-gpg-plugin/sign-and-deploy-file-mojo.html --> |
| 578 | + <goal>sign-and-deploy-file</goal> |
542 | 579 | </goals> |
543 | | - <phase>verify</phase> |
| 580 | + <phase>deploy</phase> |
| 581 | + <configuration> |
| 582 | + <file>${project.build.directory}/${project.build.finalName}.jar</file> |
| 583 | + <repositoryId>ossrh</repositoryId> |
| 584 | + <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> |
| 585 | + <!-- Prevent gpg from using pinentry programs --> |
| 586 | + <gpgArguments> |
| 587 | + <arg>--pinentry-mode</arg> |
| 588 | + <arg>loopback</arg> |
| 589 | + </gpgArguments> |
| 590 | + <!-- Custom reduced pom file for fat jar --> |
| 591 | + <pomFile>${project.basedir}/uber-minimal-pom.xml</pomFile> |
| 592 | + <sources>${project.build.directory}/${project.build.finalName}-sources.jar</sources> |
| 593 | + <javadoc>${project.build.directory}/${project.build.finalName}-javadoc.jar</javadoc> |
| 594 | + <files>${project.build.directory}/${project.build.finalName}-thin.jar</files> |
| 595 | + <types>jar</types> |
| 596 | + <classifiers>thin</classifiers> |
| 597 | + </configuration> |
544 | 598 | </execution> |
545 | 599 | </executions> |
546 | 600 | </plugin> |
| 601 | + <plugin> |
| 602 | + <groupId>org.apache.maven.plugins</groupId> |
| 603 | + <artifactId>maven-deploy-plugin</artifactId> |
| 604 | + <version>2.8.2</version> |
| 605 | + <configuration> |
| 606 | + <skip>true</skip> |
| 607 | + </configuration> |
| 608 | + </plugin> |
547 | 609 | <plugin> |
548 | 610 | <groupId>org.sonatype.plugins</groupId> |
549 | 611 | <artifactId>nexus-staging-maven-plugin</artifactId> |
|
553 | 615 | <serverId>ossrh</serverId> |
554 | 616 | <nexusUrl>https://oss.sonatype.org/</nexusUrl> |
555 | 617 | <autoReleaseAfterClose>true</autoReleaseAfterClose> |
| 618 | + <skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo> |
556 | 619 | </configuration> |
| 620 | + <executions> |
| 621 | + <execution> |
| 622 | + <id>nexus-deploy</id> |
| 623 | + <phase>deploy</phase> |
| 624 | + <goals> |
| 625 | + <goal>release</goal> |
| 626 | + </goals> |
| 627 | + </execution> |
| 628 | + </executions> |
557 | 629 | </plugin> |
558 | 630 | </plugins> |
559 | 631 | </build> |
| 632 | + <distributionManagement> |
| 633 | + <repository> |
| 634 | + <id>ossrh</id> |
| 635 | + <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> |
| 636 | + </repository> |
| 637 | + </distributionManagement> |
560 | 638 | </profile> |
561 | 639 | </profiles> |
562 | 640 | </project> |
0 commit comments