[
https://issues.apache.org/jira/browse/FLINK-40665?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martijn Visser resolved FLINK-40665.
------------------------------------
Fix Version/s: 2.4.0
Resolution: Fixed
Fixed in apache/flink:master 86dbd01f9c5e0044000b090b122af7ad102ab1c3
> cron_snapshot_deployment_maven fails the Maven version enforcer because
> deploy_staging_jars.sh uses the Maven on PATH
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: FLINK-40665
> URL: https://issues.apache.org/jira/browse/FLINK-40665
> Project: Flink
> Issue Type: Bug
> Components: Build System
> Reporter: Martijn Visser
> Assignee: Martijn Visser
> Priority: Critical
> Labels: pull-request-available
> Fix For: 2.4.0
>
>
> {code}
> [INFO] --- maven-enforcer-plugin:3.1.0:enforce (enforce-maven-version) @
> flink-parent ---
> [ERROR] Rule 0: org.apache.maven.plugins.enforcer.RequireMavenVersion failed
> with message:
> Detected Maven Version: 3.8.6 is not in the allowed range 3.9.
> {code}
> {{tools/releasing/deploy_staging_jars.sh}} line 23 is {{MVN=${MVN:-mvn}}} and
> line 46 runs {{$MVN clean deploy}}.
> {{tools/azure-pipelines/build-nightly-dist.yml}} exports {{CUSTOM_OPTIONS}}
> and {{MVN_RUN_VERBOSE}} before calling it but never sets {{MVN}}, so the
> deploy uses the 3.8.6 on the container PATH while the rest of the build goes
> through the wrapper. The same log shows both:
> {code}
> Apache Maven 3.9.16 (2bdd9fddda4b155ebf8000e807eb73fd829a51d5)
> Maven home:
> /home/vsts_azpcontainer/.m2/wrapper/dists/apache-maven-3.9.16-bin/4200fbc6/apache-maven-3.9.16
> ...
> + mvn clean deploy -Prelease,docs-and-source -DskipTests ...
> ...
> Detected Maven Version: 3.8.6 is not in the allowed range 3.9.
> {code}
> The enforcer has required {{[3.9.16]}} since FLINK-40459 on 2026-08-28, but
> the job died earlier on the stale {{free_disk_space.sh}} path until
> FLINK-40654, so build 79074 is the first run to reach it.
> {{tools/ci/maven-utils.sh}} already resolves
> {{MAVEN_WRAPPER="${CI_DIR}/../../mvnw"}}, and {{build-nightly-dist.yml}} is
> the only caller of the script.
> https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=79074
--
This message was sent by Atlassian Jira
(v8.20.10#820010)