Skip to content

Commit e3a53a5

Browse files
[FLINK-40459][build] Bump Maven from 3.8.6 to 3.9.16 (#29009)
Updates the enforcer requireMavenVersion pin, wrapper distributionUrl/ checksum, and documented Maven version (README, AGENTS.md, docs) in lock-step. Switches docs.sh to build via the Maven wrapper instead of the CI image's system Maven, consistent with the rest of CI. Maven 3.9 changed plugin execution logging from artifactId-based to goal-prefix-based; flink-ci-tools' CI log parsers now accept both forms.
1 parent 6fc280f commit e3a53a5

16 files changed

Lines changed: 99 additions & 34 deletions

File tree

.github/workflows/docs.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ set -e
2323
export JAVA_HOME=$JAVA_HOME_17_X64
2424
export PATH=$JAVA_HOME_17_X64/bin:$PATH
2525

26-
mvn --version
26+
./mvnw --version
2727
java -version
2828
javadoc -J-version
2929

@@ -62,11 +62,11 @@ ErrorDocument 404 /flink/flink-docs-${BRANCH}/404.html
6262
EOF
6363

6464
# build Flink; required for Javadoc step
65-
mvn clean install -B -DskipTests -Dfast -Dskip.npm -Pskip-webui-build
65+
./mvnw clean install -B -DskipTests -Dfast -Dskip.npm -Pskip-webui-build
6666

6767
# build java/scala docs
6868
mkdir -p docs/target/api
69-
mvn javadoc:aggregate -B \
69+
./mvnw javadoc:aggregate -B \
7070
-Pskip-webui-build \
7171
-Dmaven.javadoc.failOnError=true \
7272
-Dcheckstyle.skip=true \

.mvn/wrapper/maven-wrapper.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# under the License.
1717

1818
# updating the Maven version requires updates to certain documentation and verification logic
19-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip
20-
distributionSha256Sum=ccf20a80e75a17ffc34d47c5c95c98c39d426ca17d670f09cd91e877072a9309
21-
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar
22-
wrapperSha256Sum=3d8f20ce6103913be8b52aef6d994e0c54705fb527324ceb9b835b338739c7a8
19+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.16/apache-maven-3.9.16-bin.zip
20+
distributionSha256Sum=5af3b743dd8b876b5c45da33b676251e5f1687712644abb4ee519ca56e1d89ce
21+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.4/maven-wrapper-3.3.4.jar
22+
wrapperSha256Sum=4e2fbf6554bc8a4702cdfdd3bef464f423393d784ddbb037216320ce55d5e4e1

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This file provides guidance for AI coding agents working with the Apache Flink c
2424
## Prerequisites
2525

2626
- Java 11, 17 (default), or 21. Java 11 syntax must be used in all modules. Java 17 syntax (records, sealed classes, pattern matching) is only permitted in the `flink-tests-java17` module.
27-
- Maven 3.8.6 (Maven wrapper `./mvnw` included; prefer it)
27+
- Maven 3.9.16 (Maven wrapper `./mvnw` included; prefer it)
2828
- Git
2929
- Unix-like environment (Linux, macOS, WSL, Cygwin)
3030

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Prerequisites for building Flink:
103103

104104
* Unix-like environment (we use Linux, Mac OS X, Cygwin, WSL)
105105
* Git
106-
* Maven (we require version 3.8.6)
106+
* Maven (we require version 3.9.16)
107107
* Java (version 11, 17, or 21)
108108

109109
### Basic Build Instructions

docs/content.zh/docs/dev/configuration/maven.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ under the License.
2828

2929
## 要求
3030

31-
- Maven 3.8.6
31+
- Maven 3.9.16
3232
- Java 11
3333

3434
## 将项目导入 IDE

docs/content/docs/dev/configuration/maven.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ publish, and deploy projects. You can use it to manage the entire lifecycle of y
3030

3131
## Requirements
3232

33-
- Maven 3.8.6
33+
- Maven 3.9.16
3434
- Java 11
3535

3636
## Importing the project into your IDE

mvnw

Lines changed: 18 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mvnw.cmd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1879,7 +1879,7 @@ under the License.
18791879
<configuration>
18801880
<rules>
18811881
<requireMavenVersion>
1882-
<version>[3.8.6]</version>
1882+
<version>[3.9.16]</version>
18831883
</requireMavenVersion>
18841884
<requireJavaVersion>
18851885
<version>${target.java.version}</version>

tools/ci/flink-ci-tools/src/main/java/org/apache/flink/tools/ci/suffixcheck/ScalaSuffixChecker.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,11 @@ public class ScalaSuffixChecker {
4545
private static final Logger LOG = LoggerFactory.getLogger(ScalaSuffixChecker.class);
4646

4747
// [INFO] --- maven-dependency-plugin:3.1.1:tree (default-cli) @ flink-annotations ---
48+
// [INFO] --- dependency:3.1.1:tree (default-cli) @ flink-annotations ---
49+
// Maven logs the plugin as "maven-dependency-plugin" up to 3.8 and as "dependency" (the goal
50+
// prefix) from 3.9 on; both spellings are accepted so the parser works on either Maven version.
4851
private static final Pattern moduleNamePattern =
49-
Pattern.compile(".* --- maven-dependency-plugin.* @ (.*) ---.*");
52+
Pattern.compile(".* --- (?:maven-)?dependency(?:-plugin)?:.* @ (.*) ---.*");
5053

5154
// [INFO] +- junit:junit:jar:4.13.2:test
5255
// [INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test

0 commit comments

Comments
 (0)