-
Notifications
You must be signed in to change notification settings - Fork 28
Catalog Migrator: Configure Apache Maven publishing #135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Add support for publishing artifacts to Apache Nexus repository with proper Maven Central metadata and signing capabilities. Changes: - Add nexus-publish-plugin to root build.gradle.kts with Apache repository configuration supporting both environment variables (ASF_USERNAME, ASF_PASSWORD) and Gradle properties - Create publishing.kt with Maven publication setup including: * Proper POM metadata (licenses, SCM, mailing lists, issue tracking) * Support for publishing shadow JARs (CLI module) * Conditional signing for release builds (-Prelease flag) * Source and Javadoc JAR generation for non-shadow modules - Configure build-conventions to apply publishing to all projects - Update CLI module to apply shadow plugin The configuration supports: - Local testing: ./gradlew publishToMavenLocal - Apache release: ./gradlew publishToApache -Prelease -PuseGpgAgent - Staging management: ./gradlew closeAndReleaseApacheStagingRepository Published artifacts: - org.apache.polaris.tools:iceberg-catalog-migrator-api (with sources, javadoc) - org.apache.polaris.tools:iceberg-catalog-migrator-api-test (with sources, javadoc) - org.apache.polaris.tools:iceberg-catalog-migrator-cli (shadow JAR)
|
Can I please get a review on this? |
snazy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a bunch of independent projects in polaris-tools, so I think it's better to change the group-ID to org.apache.polaris.tools.iceberg-catalog-migrator so it has it's "own namespace" that doesn't conflict with other tools.
I don't see that the signing-extension (the signatory) being configured - neither with a secret-key/password combination nor via the optional useGpgAgent project property.
Changes: 1. Change group ID from 'org.apache.polaris.tools' to 'org.apache.polaris.tools.iceberg-catalog-migrator' to give it its own namespace and avoid conflicts with other tools in polaris-tools 2. Configure signing extension properly following Apache Polaris main repo pattern: - Support both in-memory PGP keys (signingKey/signingPassword properties) - Support gpg-agent (useGpgAgent property) - Enable signing with either 'release' or 'signArtifacts' property 3. Update license name to use SPDX identifier 'Apache-2.0'
|
@snazy: Thanks a lot for the review.
That makes sense — having a distinct namespace per tool is reasonable.
Done. And verified Signing with new options. |
|
I'd prefer a |
| username.set(System.getenv("ASF_USERNAME") ?: findProperty("asfNexusUsername") as String?) | ||
| password.set(System.getenv("ASF_PASSWORD") ?: findProperty("asfNexusPassword") as String?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This introduces a new, different way from how the creds are passed in the main Polaris repo, can you please align with that and use the same names.
| delayBetween.set(java.time.Duration.ofSeconds(10)) | ||
| } | ||
| repositories { | ||
| create("apache") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| create("apache") { | |
| register("apache") { |
Add support for publishing artifacts to Apache Nexus repository with proper Maven Central metadata and signing capabilities.
Changes:
build.gradle.ktswith Apache repository configuration supporting both environment variables (ASF_USERNAME,ASF_PASSWORD) and Gradle propertiespublishing.ktwith Maven publication setup including:The configuration supports:
./gradlew publishToMavenLocal./gradlew publishToApache -Prelease -PuseGpgAgent./gradlew closeAndReleaseApacheStagingRepositoryPublished artifacts: