Repository navigation
GH-3894: Prepare RC: stage through nexus-staging-maven-plugin - #3895
Merged
Fokko merged 3 commits intoOct 28, 2026
Merged
Conversation
A plain `mvn deploy` to repository.apache.org relies on Nexus implicitly creating a staging repository, and never tells the client which one it used. prepare-rc.sh then had to guess: nexus_find_open_staging_repo listed every open repository in the org.apache.parquet profile and refused to continue unless there was exactly one. That guess fails in two ways. On 2026-09-10 a single 1.19.0 run ended with two open repositories (orgapacheparquet-1085 and -1086) and aborted before closing either. And parquet-format publishes under the same groupId, so it shares the staging profile: any open repository from a parquet-format release would block a parquet-java release, or be mistaken for one. GitHub concurrency groups are per repository, so the workflows cannot serialize across the two. Add nexus-staging-maven-plugin 1.7.0 to the apache-release profile with extensions enabled, so it replaces maven-deploy-plugin for `mvn deploy` under that profile only. It stages every module locally, opens one staging repository, uploads into it, closes it, and records the repository ID in target/nexus-staging/staging/<profileId>.properties. prepare-rc.sh now reads the ID from that file rather than searching for it, which removes nexus_find_open_staging_repo and its multiple-repo guard. The plugin also takes over the close from our bulk-close call. Its close waits for completion and prints rule failures (such as the missing public key on 2026-09-14), where the bulk call returned while the close was still in progress. keepStagingRepositoryOnCloseRuleFailure keeps a repository that fails a rule so it can be inspected, and the properties file is written before the close, so a failed close still reports which repository was left behind. stagingProgressTimeoutMinutes is raised from 5 to 15 because a 16-module close may run past the default. -DstagingDescription sets "Apache Parquet <version> RC<n>" on the repository at creation, which is the description cancel-rc.sh and publish-release.sh verify. After the deploy, prepare-rc.sh runs the same nexus_verify_staging_repo check against the new repository. stagingProfileId is left unset, so the plugin resolves the profile from the groupId through the profile_evaluate endpoint. If the deployer account cannot call that endpoint, the next run fails before uploading anything and the profile ID has to be configured explicitly. nexus_close_staging_repo had no remaining callers and is removed. cancel-rc.sh and publish-release.sh already take the repository ID as an argument and are unchanged. Generated-by: Claude Opus 5.5 (1M context)
On a close rule failure, nexus-staging-maven-plugin 1.7.0 deletes its staging properties file in afterUploadFailure before deciding whether to keep the repository. With keepStagingRepositoryOnCloseRuleFailure set, that is exactly the case where a repository is left behind, so reading the properties file on the failure path could never report it, and printed a misleading "Expected one staging properties file" error instead. maven_deploy now tees Maven output to target/nexus-deploy.log, and the failure path reads every ` * Created staging repository with ID "..."` line from it. The plugin logs that line for each repository it opens, before any upload, so it survives every failure mode. The message says to check whether the repository still exists, because some failures (an upload IOException) drop it automatically. PIPESTATUS keeps mvnw's exit status through the tee regardless of pipefail. Set autoReleaseAfterClose=false explicitly. It is the default, but the plugin also binds it to -DautoReleaseAfterClose, and a release after close would publish an RC before the vote; configuration in the pom takes precedence over the user property. The plugin version moves to a nexus-staging-maven-plugin.version property like the other build plugins. The step summary now reports success only after nexus_verify_staging_repo passes, and records a line for each failure exit. Tests cover the stale staging directory being cleared, the description reaching mvnw as one argument, mvnw's exit status propagating through the tee, more than one properties file, the default staging directory, and parsing repository IDs from the deploy log. Generated-by: Claude Opus 5.5 (1M context)
When the deploy succeeds but maven_read_staging_repo_id fails, the step summary only said to look in the Maven log. The deploy log already records every repository the plugin created, so report those IDs the same way the deploy failure path does. If the log shows no created repository either, nexus-staging-maven-plugin most likely did not run and maven-deploy-plugin deployed into a repository Nexus created implicitly, so say that and point at Nexus. Generated-by: Claude Opus 5.5 (1M context)
Fokko
approved these changes
Oct 28, 2026
| <artifactId>nexus-staging-maven-plugin</artifactId> | ||
| <version>${nexus-staging-maven-plugin.version}</version> | ||
| <extensions>true</extensions> | ||
| <configuration> |
Contributor
There was a problem hiding this comment.
Does it automatically pick up the credentials?
Member
Author
There was a problem hiding this comment.
Yep, or I should say it uses the same ENV variables we are already setting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
prepare-rc.shdeploys with a plainmvn deploy, lets Nexus implicitly create a staging repository, and then guesses which open repository in theorg.apache.parquetprofile was created. This PR switches to using an explicit repository creation which returns the exact repo-id we need to validate.Note: We don't need to do anything for Cancel or Release scripts since they already require the repo-id. Prepare is the only step which currently makes the repository without being sure which one it made.
What changes are included in this PR?
Maven Changes
nexus-staging-maven-plugin1.7.0 to theapache-releaseprofile with extensions enabled. Replacingmaven-deploy-pluginformvn deployunder that profileAutomation Script Changes
prepare-rc.shpasses-DstagingDescription="Apache Parquet <version> RC<n>"and validates using the repository id (no check for a single repository or fail check)Created staging repository with IDlines fromtarget/nexus-deploy.lognexus_find_open_staging_repo(and its one-open-repo guard) andnexus_close_staging_repo, which have no remaining callers.Are these changes tested?
Yes.
0.0.0-testversionAre there any user-facing changes?
For release managers only.
release:performalso activates theapache-releaseprofile, so a manual release now stages through the plugin too:release:performcloses the staging repository itself, so the manual "Close" step in Nexus is no longer needed../mvnw release:perform -DskipTests -Darguments="-DskipTests -DstagingDescription='Apache Parquet <version> RC<n>'".Steps 2 and 3 of the release guide need a follow-up update in the parquet-site repository.
Closes #3894
🤖 Generated in tandem with Claude Code