[FLINK-40459][Build/Shaded] Bump Maven from 3.8.6 to 3.9.16 - #170
Merged
MartijnVisser merged 1 commit intoAug 26, 2026
Merged
Conversation
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)
MartijnVisser
force-pushed
the
FLINK-40459-maven-version
branch
from
August 25, 2026 15:53
5720ab1 to
2c296c9
Compare
snuyanzin
approved these changes
Aug 26, 2026
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
Bump the build and enforced Maven version from
3.8.6to3.9.16, matching apache/flink#29009 for FLINK-40459, and add a Maven wrapper so CI and local builds share one pin.Why
Maven 3.9 renders 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'DeployParserandDependencyParsermatch on the artifactId spelling, so under 3.9.16 they match nothing,NoticeFileCheckersees zero deployed modules, and the NOTICE check degrades to a no-op that still exits 0 — a green build that checked nothing:Extracted N modules that were deployedNo released
flink-ci-toolsfixes this — I checked the 1.18.0, 1.20.4 and 2.2.1 jars on Central — so CI rewrites the two affected banners back to the 3.8 spelling before invoking the checker.ShadeParseris unaffected; its regex already starts with.*.Changes
.mvn/wrapper/maven-wrapper.properties,mvnw,mvnw.cmd— wrapper pinning Maven 3.9.16 (maven-wrapper 3.3.4), matching Flink's. Added script-only:maven-wrapper.jaris not checked in, so no binary enters the ASF source release;mvnwfetches it on first use and verifieswrapperSha256Sum. The earlier attempt here (0a4baad) checked the jar in and was reverted 18 minutes later..github/workflows/ci.yml— build through./mvnw, drop thestCarolas/setup-mavenstep, and normalize the two mojo banners before the license check. The workflow now contains no Maven version at all:maven-wrapper.propertiesis the single pin. Drop the normalization step onceflink-ci-toolsships the FLINK-40459 parser fix.pom.xml— thereleaseprofile'srequireMavenVersionpin[3.8.6]→[3.9.16]..gitignore/README.md— ignore the downloaded wrapper jar; document the required Maven version.Release scripts under
tools/releasing/keep using the systemmvn.Verification
Differential build of the full reactor under both Maven versions, on JDK 11 and 17, across the default,
-Pinclude-netty-tcnative-static,-Plicense-check,-Dshade-sourcesand-Preleaseprofiles:META-INF/NOTICE,META-INF/DEPENDENCIESand the dependency-reduced/flattened poms included. The only difference anywhere is the manifestCreated-By: Apache Maven 3.8.6→3.9.16and the matchingpom.propertiescomment; the three Ant-repackaged netty/tcnative jars are unchanged, as expected.dependency:tree/dependency:listmatch exactly.flink-rpc/flink-rpc-akkabuilt against each artifact set with the same Maven gives uber-jars identical in all 12323 entries.Per-commit detail, including the old plugin set's behaviour under 3.9.16 and the negative controls, is in the commit message.
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Claude Opus 5)