dejan2609 opened a new pull request, #30255:
URL: https://github.com/apache/flink/pull/30255
## What is the purpose of the change
This pull request upgrades the Maven version used to build Flink from 3.9.16
to 3.10.2, following the earlier 3.8.6 → 3.9.16 upgrade (FLINK-40459).
Maven 3.10.x rejects duplicate plugin declarations in a POM, which Maven
3.9.x only reported as a warning. `flink-python/pom.xml` contains such a
duplicate (`maven-dependency-plugin`), so with Maven 3.10.2 the reactor fails
to load:
```
[ERROR] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found
duplicate declaration of plugin
org.apache.maven.plugins:maven-dependency-plugin @ line 655, column 12
[ERROR] The build could not read 1 project
```
## Brief change log
- `flink-python`: the `copy-dependencies` execution is moved into the
single `maven-dependency-plugin` declaration. This part does not depend on the
Maven version: with Maven 3.9.16 the warning is gone and the effective POM
stays byte-identical.
- Maven wrapper: `distributionUrl` and `distributionSha256Sum` point to
Maven 3.10.2. The wrapper itself stays at 3.3.4 (`only-script`), so
`mvnw`/`mvnw.cmd` are unchanged.
- `pom.xml`: the enforcer `requireMavenVersion` pin is set to `[3.10.2]`.
- Documented Maven version updated in `README.md`, `AGENTS.md` and
`docs/content{,.zh}/docs/dev/configuration/maven.md`.
The SHA-256 of `apache-maven-3.10.2-bin.zip` was computed locally after
verifying the zip against the SHA-512 published by Apache (Apache publishes no
SHA-256 for the distribution).
## Verifying this change
This change is already covered by existing CI checks. In addition, it was
verified locally (Linux, Temurin 17, Maven 3.10.2 via `./mvnw`):
- `mvn wrapper:wrapper -Dmaven=3.10.2` (without `-N`) loads the full
reactor; before the `flink-python` fix it failed with the error above.
- `flink-python` effective POM (Maven 3.9.16) is identical before and
after the fix. Both `maven-dependency-plugin` executions (`copy`,
`copy-dependencies`) still run during `package`.
- `tools/ci/compile_ci.sh` (what the "Test packaging/licensing" job runs),
with `PROFILE="-Djdk17 -Pjava17-target"`, from a clean build: `BUILD SUCCESS`.
Javadoc, the bundled-optional, Scala-suffix and shaded-artifact checks and the
license check all pass.
- Maven 3.10 logs plugin executions in the same format as 3.9 (`---
<prefix>:<version>:<goal> (<id>) @ <module> ---`), so the `flink-ci-tools`
parsers need no change. The license checker reports the same result as the
master CI run on Maven 3.9.16 (run 46933732764, on the same master commit
`e78a2beb98f`): 129 deployed modules, 170 bundling modules, and the same NOTICE
findings (only the existing non-severe "not bundled, but listed" entries).
- `apache-rat-plugin:check -N` via `run_mvn`: no unapproved licenses.
The checks above ran on master `e78a2beb98f`; this PR is rebased onto a
newer master, whose new commits change no POM, Maven wrapper or CI files.
Not verified locally: test suites, e2e tests, Java 11/21/25 builds. CI
covers these.
## Draft: waiting for the CI image
This PR is a **draft** until a CI image with Maven 3.10.2 is available. The
current image (`apache/flink-ci-docker:..._maven_386_3916_resolute_v3`)
pre-downloads only Maven 3.8.6 and 3.9.16, so until then `./mvnw` downloads
Maven 3.10.2 (~10 MB) once per CI job. The build itself works, and reviews of
the changes above are welcome in the meantime.
Related pull request (also FLINK-41784): apache/flink-ci-docker#13 adds
Maven 3.10.2 to `MAVEN_WARM` in the CI image.
```
flink-ci-docker#13 ─> merged ─> new image tag built & pushed (by a
maintainer)
│
this PR (draft): Maven 3.10.2 bump ───────────┴─> + commit: switch CI image
tag ─> ready for review
```
Once the new image tag is published, a second commit switches the CI image
tag in `.github/workflows/*.yml`, `azure-pipelines.yml` and
`tools/azure-pipelines/build-apache-repo.yml` (as in f03b4541b4d), and this PR
is marked ready for review.
Release branches are not affected: they keep Maven 3.8.6 (`release-1.20`,
`release-2.2`, `release-2.3`) or 3.9.16 (`release-2.4`).
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): yes (build tool:
Maven 3.9.16 → 3.10.2; no runtime dependency changes)
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: no
- The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
- The S3 file system connector: no
## Documentation
- Does this pull request introduce a new feature? no
- If yes, how is the feature documented? not applicable (the documented
Maven version is updated)
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes (please specify the tool below)
Generated-by: Claude Code (Claude Opus 5.5)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]