Skip to content

Add support for Sonatype snapshot publishing to maven-publish - #639

Open
paul-aiyedun wants to merge 1 commit into
mainfrom
paul-aiyedun/add_sonatype_nightly_snapshots
Open

paul-aiyedun wants to merge 1 commit into
mainfrom
paul-aiyedun/add_sonatype_nightly_snapshots

Conversation

@paul-aiyedun

Copy link
Copy Markdown
Contributor
  • Add maven_snapshot_publish.sh and its helpers. Deploys via mvn sign-and-deploy-file to the Sonatype snapshot repository so Nexus timestamps each publish and updates maven-metadata.xml.

  • Branch destination inside maven-publish.yaml on rapids-is-release-build. Maven Central for release tags, the Sonatype snapshot repository otherwise.

  • Sign both release and -SNAPSHOT trees in one prepare_maven_bundle.sh invocation.

  • Reject release-shaped inputs on the snapshot publish path, so a bad build cannot land release coordinates in the snapshot repository.

Closes https://github.com/rapidsai/build-infra/issues/384

* Add `maven_snapshot_publish.sh` and its helpers. Deploys via
  `mvn sign-and-deploy-file` to the Sonatype snapshot repository so
  Nexus timestamps each publish and updates `maven-metadata.xml`.

* Branch destination inside `maven-publish.yaml` on
  `rapids-is-release-build`. Maven Central for release tags, the
  Sonatype snapshot repository otherwise.

* Sign both release and -SNAPSHOT trees in one `prepare_maven_bundle.sh`
  invocation.

* Reject release-shaped inputs on the snapshot publish path, so a bad
  build cannot land release coordinates in the snapshot repository.
@paul-aiyedun
paul-aiyedun requested a review from a team as a code owner September 14, 2026 23:36
@paul-aiyedun
paul-aiyedun requested review from KyleFromNVIDIA and removed request for a team September 14, 2026 23:36
@paul-aiyedun paul-aiyedun added feature request New feature or request non-breaking Introduces a non-breaking change labels Sep 14, 2026
@paul-aiyedun

Copy link
Copy Markdown
Contributor Author

This workflow update was tested as part of NVIDIA/cudf#24134 (comment).

-Dmaven.wagon.http.retryHandler.count=3
-DretryFailedDeploymentCount=3
-s "${settings_file}"
org.apache.maven.plugins:maven-gpg-plugin:3.1.0:sign-and-deploy-file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The -SNAPSHOT sign with maven-gpg-plugin has a potential issue of: publishes signature metadata using the base -SNAPSHOT version, while Maven gives the artifact a timestamped snapshot name, e.g.,

cudf-26.12.0-timestamps1-1.jar --> cudf-26.12.0-SNAPSHOT.jar.asc instead of cudf-26.12.0-timestamps1-1.jar.asc
cudf-26.12.0-timestamps2-2.jar --> cudf-26.12.0-SNAPSHOT.jar.asc instead of cudf-26.12.0-timestamps2-3.jar.asc
cudf-26.12.0-timestamps3-3.jar- -> cudf-26.12.0-SNAPSHOT.jar.asc instead of cudf-26.12.0-timestamps3-3.jar.asc

That means many timestamped JARs share the same SNAPSHOT.jar.asc file.

Image

This is not a major issue because signature files are neither required nor guaranteed to correspond to
each timestamped JAR for the snapshots deployment.

Only release deployments require correct one-to-one(not multi-to-one) signatures, and this issue does not affect release deployments. Release artifacts are immutable, so multiple timestamped JARs do not share a single SNAPSHOT.jar.asc file.

So either ignore this multi-to-one signature files' mismatching, as what the current change does

or just NOT sign the SNAPSHOT JARs

@NvTimLiu NvTimLiu left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for the deployment part

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature request New feature or request non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants