Skip to content

Pin Maven 3.9.16 via the Maven wrapper for CI and releases - #154

Merged
imjalpreet merged 1 commit into
prestodb:masterfrom
czentgr:cz-pin-maven-3.9-release
Oct 30, 2026
Merged

imjalpreet merged 1 commit into
prestodb:masterfrom
czentgr:cz-pin-maven-3.9-release

Conversation

@czentgr

@czentgr czentgr commented Oct 22, 2026 •

Copy link
Copy Markdown

Description

The 0.233 release (run) failed at the Central Portal validation step:

Deployment 54817c96-3b0b-4a13-b3ec-4decabbeb25e failed
 - Bundle has content that does NOT have a .pom file: com/facebook/airlift/stats, ... (all modules)

Root cause: ubuntu-latest now ships Maven 3.10.0 (the last good run, 0.232, used 3.9.16). Under 3.10, central-publishing-maven-plugin no longer deletes the per-artifact maven-metadata-*.xml from the staging directory before bundling (the 0.232 log has 44 Pre Bundling - deleted lines, the 0.233 log has none), so Central rejects the bundle. Upstream: mavenplugins/central-publishing-maven-plugin#79.

This adds a Maven wrapper pinned to 3.9.16 (with distributionSha256Sum) and switches release.yml and maven.yml to ./mvnw.

Consistency with prestodb/presto

This mirrors how prestodb/presto already builds:

  • presto checks in mvnw, mvnw.cmd and .mvn/wrapper/maven-wrapper.properties, pinned to Maven 3.9.12.
  • presto's workflows, including presto-release-prepare.yml and presto-release-publish.yml, call ./mvnw rather than the runner's mvn, which is why presto releases are unaffected by the runner's move to 3.10.0.
  • With this change, airlift's CI and release builds run on a pinned 3.9.x the same way.

Differences from presto: this uses the wrapper's only-script type, so no maven-wrapper.jar binary is committed, and it pins 3.9.16, the version the last successful airlift release (0.232) ran with.

Nothing from 0.233 reached Central, and the tag was never pushed, so the release can simply be re-run after this merges.

Test plan

  • CI on this PR runs ./mvnw install.
  • After merge, re-run "Publish release" and confirm the Apache Maven 3.9.16 line in the -V output and the Pre Bundling - deleted lines in the publish step.

ubuntu-latest moved to Maven 3.10.0, where central-publishing-maven-plugin
leaves maven-metadata files in the staging bundle and Central rejects it
("Bundle has content that does NOT have a .pom file"). This failed the
0.233 release. Upstream: mavenplugins/central-publishing-maven-plugin#79.
@sourcery-ai

sourcery-ai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

The PR makes Maven execution deterministic by adding a checksum-verified wrapper pinned to Maven 3.9.16, then updates CI and release workflows to invoke it so Central Portal publishing uses the known-good Maven version rather than the runner’s Maven 3.10.0.

File-Level Changes

Change Details Files
Pins Maven to 3.9.16 through a checked-in Maven wrapper with SHA-256 verification and cross-platform launchers.
  • Adds the Maven wrapper configuration and scripts using the only-script distribution type.
  • Pins the Maven binary URL and validates its distribution checksum before installation.
  • Supports cached wrapper distributions and fallback download mechanisms on Unix and Windows.
.mvn/wrapper/maven-wrapper.properties
mvnw
mvnw.cmd
Routes CI and release automation through the pinned Maven wrapper instead of the runner-provided Maven.
  • Uses ./mvnw install in the Maven CI workflow.
  • Uses ./mvnw for release version evaluation, preparation, and deployment.
  • Preserves existing release arguments and deployment behavior while standardizing Maven version selection.
.github/workflows/maven.yml
.github/workflows/release.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sonarqubecloud

Copy link
Copy Markdown

@czentgr
czentgr marked this pull request as ready for review October 28, 2026 17:45
@czentgr
czentgr requested a review from a team as a code owner October 28, 2026 17:45
@czentgr
czentgr requested a review from imjalpreet October 28, 2026 17:45

@sourcery-ai sourcery-ai Bot 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.

Hey - I've found 2 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="mvnw" line_range="180" />
<code_context>
+
+# select .zip or .tar.gz
+if ! command -v unzip >/dev/null; then
+  distributionUrl="${distributionUrl%.zip}.tar.gz"
+  distributionUrlName="${distributionUrl##*/}"
+fi
</code_context>
<issue_to_address>
**Tarball checksum validation fails**

When the Unix host lacks `unzip` and the wrapper selects the `.tar.gz` fallback, `distributionSha256Sum` still contains the `.zip` digest, so checksum validation rejects the downloaded tarball and Maven never starts.

Use the `.tar.gz` archive’s matching checksum when selecting the tarball fallback.
</issue_to_address>

### Comment 2
<location path=".github/workflows/release.yml" line_range="89" />
<code_context>
           git ls -5
           cat ~/.m2/settings.xml
-          mvn -V -B -U -e -T2C deploy \
+          ./mvnw -V -B -U -e -T2C deploy \
             -DautoReleaseAfterClose=true \
             -DkeepStagingRepositoryOnCloseRuleFailure=true \
</code_context>
<issue_to_address>
**Legacy builds bypass the pin**

When the Jenkins release pipeline or Travis build is used, jenkins’ release steps and the Travis build still invoke system `mvn`, so those paths do not use the wrapper’s Maven 3.9.16; Jenkins explicitly runs Maven 3.8.6, and Travis remains dependent on its runner’s Maven version.

Switch those remaining Maven invocations to `./mvnw`, or explicitly remove/decommission the legacy paths if they are no longer supported.

Also at `.github/workflows/maven.yml:33`.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread mvnw

# select .zip or .tar.gz
if ! command -v unzip >/dev/null; then
distributionUrl="${distributionUrl%.zip}.tar.gz"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium · Tarball checksum validation fails

When the Unix host lacks unzip and the wrapper selects the .tar.gz fallback, distributionSha256Sum still contains the .zip digest, so checksum validation rejects the downloaded tarball and Maven never starts.

Use the .tar.gz archive’s matching checksum when selecting the tarball fallback.

Prompt for AI agents
In `mvnw` at line 180:

**Tarball checksum validation fails**

When the Unix host lacks `unzip` and the wrapper selects the `.tar.gz` fallback, `distributionSha256Sum` still contains the `.zip` digest, so checksum validation rejects the downloaded tarball and Maven never starts.

Use the `.tar.gz` archive’s matching checksum when selecting the tarball fallback.

git ls -5
cat ~/.m2/settings.xml
mvn -V -B -U -e -T2C deploy \
./mvnw -V -B -U -e -T2C deploy \

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium · Legacy builds bypass the pin

When the Jenkins release pipeline or Travis build is used, jenkins’ release steps and the Travis build still invoke system mvn, so those paths do not use the wrapper’s Maven 3.9.16; Jenkins explicitly runs Maven 3.8.6, and Travis remains dependent on its runner’s Maven version.

Switch those remaining Maven invocations to ./mvnw, or explicitly remove/decommission the legacy paths if they are no longer supported.

Also at .github/workflows/maven.yml:33.

Prompt for AI agents
In `.github/workflows/release.yml` at line 89:

**Legacy builds bypass the pin**

When the Jenkins release pipeline or Travis build is used, jenkins’ release steps and the Travis build still invoke system `mvn`, so those paths do not use the wrapper’s Maven 3.9.16; Jenkins explicitly runs Maven 3.8.6, and Travis remains dependent on its runner’s Maven version.

Switch those remaining Maven invocations to `./mvnw`, or explicitly remove/decommission the legacy paths if they are no longer supported.

Also at `.github/workflows/maven.yml:33`.

@czentgr

czentgr commented Oct 30, 2026

Copy link
Copy Markdown
Author

@imjalpreet @agrawalreetika Can you please review?

@imjalpreet imjalpreet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, @czentgr.

@imjalpreet
imjalpreet merged commit 9df94fb into prestodb:master Oct 30, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants