[FLINK-40459][build] Bump Maven from 3.8.6 to 3.9.16 - #29009
Open
MartijnVisser wants to merge 2 commits into
Open
[FLINK-40459][build] Bump Maven from 3.8.6 to 3.9.16#29009MartijnVisser wants to merge 2 commits into
MartijnVisser wants to merge 2 commits into
Conversation
Collaborator
snuyanzin
reviewed
Aug 24, 2026
| distributionSha256Sum=ccf20a80e75a17ffc34d47c5c95c98c39d426ca17d670f09cd91e877072a9309 | ||
| distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.16/apache-maven-3.9.16-bin.zip | ||
| distributionSha256Sum=5af3b743dd8b876b5c45da33b676251e5f1687712644abb4ee519ca56e1d89ce | ||
| wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar |
Contributor
There was a problem hiding this comment.
since you are here, should we bump maven-wrapper to 3.3.4?
There was a problem hiding this comment.
Pull request overview
Updates Apache Flink’s enforced build Maven version to 3.9.16, aligning the Maven Enforcer rule, Maven Wrapper distribution, CI docs workflow usage, and all documented prerequisites.
Changes:
- Bump the Maven Enforcer
requireMavenVersionpin to[3.9.16]. - Update Maven Wrapper distribution URL and SHA-256 to Maven 3.9.16.
- Update docs and CI docs build script to consistently use the wrapper (
./mvnw) and reflect the new required Maven version.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updates the documented required Maven version to 3.9.16. |
| pom.xml | Enforces Maven 3.9.16 via the Maven Enforcer plugin. |
| docs/content/docs/dev/configuration/maven.md | Updates English docs requirement to Maven 3.9.16. |
| docs/content.zh/docs/dev/configuration/maven.md | Updates Chinese docs requirement to Maven 3.9.16. |
| AGENTS.md | Updates AI agent prerequisites to Maven 3.9.16. |
| .mvn/wrapper/maven-wrapper.properties | Points Maven Wrapper distribution to Maven 3.9.16 with updated SHA-256. |
| .github/workflows/docs.sh | Switches remaining mvn invocations to ./mvnw for docs CI. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Updates the enforcer requireMavenVersion pin, the Maven wrapper distributionUrl/checksum, and the documented Maven version (README, AGENTS.md, docs) in lock-step. Also switches .github/workflows/docs.sh from the CI image's system Maven to the Maven wrapper: all other CI paths already build through ./mvnw (tools/ci/maven-utils.sh), so this lets the enforcer bump land without requiring a new flink-ci-docker image. Maven 3.9 logs plugin executions by goal prefix (dependency:3.2.0:tree) instead of by artifactId (maven-dependency-plugin:3.2.0:tree). The CI output parsers in flink-ci-tools now accept both spellings; without that the bundled-optional, scala-suffix and license checks no longer recognize any module. Generated-by: Claude Code (Claude Opus 5)
Regenerated with maven-wrapper-plugin 3.3.4 (type=bin). Picks up the macOS Sequoia checksum verification fix (MWRAPPER-150), whitespace trimming when reading maven-wrapper.properties, and the path traversal hardening in MavenWrapperDownloader. The ASF header and the pinned distribution/wrapper SHA-256 sums are kept in maven-wrapper.properties; the plugin does not generate those. Generated-by: Claude Code (Claude Opus 5)
MartijnVisser
force-pushed
the
FLINK-40459
branch
from
August 24, 2026 17:52
58e74a9 to
98cdae4
Compare
snuyanzin
approved these changes
Aug 24, 2026
1 task
MartijnVisser
added a commit
to MartijnVisser/flink-shaded
that referenced
this pull request
Aug 25, 2026
Aligns flink-shaded with apache/flink#29009, which moves the Flink build from Maven 3.8.6 to 3.9.16. - .mvn/wrapper/maven-wrapper.properties, mvnw, mvnw.cmd: add a Maven wrapper pinning Apache Maven 3.9.16 (maven-wrapper 3.3.4), matching Flink's - .github/workflows/ci.yml: build through ./mvnw and drop the stCarolas/setup-maven step - pom.xml: the release profile's requireMavenVersion pin [3.8.6] -> [3.9.16] - README.md: document the required Maven version and the wrapper CI builds through the wrapper rather than installing Maven separately, so the version has a single source of truth in maven-wrapper.properties instead of being pinned in both that file and the workflow, where the two could drift. This also removes the dependency on stCarolas/setup-maven, an unmaintained third-party action, and means CI exercises the wrapper's own SHA-256 verification of the downloaded distribution. Release scripts under tools/releasing/ keep using the system mvn. The wrapper is added script-only: maven-wrapper.jar is deliberately not checked in. mvnw downloads it on first use and verifies it against wrapperSha256Sum, so no binary artifact enters the ASF source release and apache-rat reports 0 binaries / 0 unapproved files. Maven 3.9 prints mojo banners using the plugin's goal prefix ("deploy:2.8.2:deploy") instead of its artifactId ("maven-deploy-plugin:2.8.2:deploy"). flink-ci-tools' DeployParser and DependencyParser match on the artifactId spelling, so under 3.9.16 they match nothing, NoticeFileChecker sees zero deployed modules, and the NOTICE check degrades to a no-op that still exits 0. No released flink-ci-tools contains the fix (verified against 1.18.0, 1.20.4 and 2.2.1), so CI normalizes the two affected banners back to the 3.8 spelling before invoking the checker. That step is a no-op on 3.8-format logs and should be removed once flink-ci-tools ships the FLINK-40459 parser fix. Validated with a differential build of the full reactor under both 3.8.6 and 3.9.16 on JDK 11 and JDK 17, across the default, -Pinclude-netty-tcnative-static, -Plicense-check, -Dshade-sources and -Prelease profile combinations. Every deployed artifact is identical entry-for-entry and content-for-content; the only difference anywhere is the MANIFEST "Created-By: Apache Maven" line and the corresponding pom.properties comment. The three Ant-repackaged netty and tcnative jars are unchanged, as expected. Dependency resolution is unchanged: two independent cold local repositories are byte-identical, and dependency:tree and dependency:list match exactly. Generated-by: Claude Code (Claude Opus 5)
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.
What is the purpose of the change
Bumps the build/enforced Maven version from 3.8.6 to 3.9.16.
Brief change log
pom.xml: theenforce-mavenexecution'srequireMavenVersionpin goes from[3.8.6]to[3.9.16](exact pin retained, no other enforcer rule touched).mvn/wrapper/maven-wrapper.properties:distributionUrlanddistributionSha256Sumupdated to Apache Maven 3.9.16 (thewrapperUrl/wrapperSha256Sumfor maven-wrapper 3.3.2 stay as they are)README.md: documented required Maven version updated to 3.9.16AGENTS.md: documented prerequisite Maven version updated to 3.9.16docs/content/docs/dev/configuration/maven.mdanddocs/content.zh/docs/dev/configuration/maven.md: documented Maven version updated to 3.9.16.github/workflows/docs.sh: the three baremvninvocations now use the Maven wrapper./mvnwOn the last point: the
apache/flink-ci-docker:...maven_386_jammyimage tags are deliberately left unchanged. All CI compile/test paths already build through the wrapper (tools/ci/maven-utils.sh->./mvnw, used by.github/actions/run_mvn), so the image's baked-in Maven is unused there.docs.sh(run inside that image bydocs.ymlanddocs-legacy.yml) was the only remaining bare-mvnconsumer, so switching it to the wrapper lets this bump land self-contained, without requiring a new flink-ci-docker image first. Release scripts undertools/releasing/keep using the systemmvn.Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
It was validated with a local red/green differential (3.8.6 vs 3.9.16) on JDK 17 and JDK 11, covering the full
flink-distreactor plus a Java 11-Preleasebuild. The comparison showed byte-identical shaded uber-jar contents, byte-identical dependency-reduced POMs, and byte-identical aggregatedNOTICEfiles.That specifically re-validates the maven-shade / immutable-dependency-tree concern from the Flink "Dependencies" wiki page, which is the historical reason Flink's Maven version was pinned so conservatively: since Maven 3.3 the dependency tree is immutable during a build, so bundled dependencies can leak as transitives unless they are marked
optional.tools/ci/verify_bundled_optional.shguards that invariant and also runs through the wrapper in CI, so it re-validates the bundled/optional marking on 3.9.16 as well.The only artifact-level difference found is that the published
flink-parentpom no longer re-inlines the release-profile plugin configuration it inherits from Apache Parent POM 35. This was verified to be cosmetic: downstream effective POMs are byte-identical either way, cross-checked against the publishedflink-parent-2.3.0.pom.Two known benign warnings appear on 3.9 and are not introduced by this change:
testCompileSourceRootsdeprecation warning (FLINK-39565 territory)maven-gpg-plugin1.4gpgArgumentswarning (a separate JIRA will follow)Local verification run for this PR, all passing:
./mvnw -versiondownloads Apache Maven 3.9.16 with the wrapper's own SHA-256 verification./mvnw -N clean validate-> enforcer passesmvn -N validatenow fails withDetected Maven Version: 3.8.6 is not in the allowed range [3.9.16,3.9.16]./mvnw clean install -DskipTests -pl flink-filesystems/flink-s3-fs-hadoop -am./mvnw clean install -DskipTests -Dfast -Pskip-webui-build -T1CDoes this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Claude Opus 5)