Repository navigation
Upgrade to Maven 4.0.0-rc-6 #12676
Description
Maven 4.0.0-rc-6 was released on 2026-07-30. This tracks moving the repositories that build against a Maven 4 pre-release onto it, so nothing is left pinned to rc-5 or older.
Each linked PR moves the repository's Maven 4 version property and — where the repository was relying on the maven4-version default in maven-gh-actions-shared — also pins the version explicitly in that repository's own maven-verify.yml, so its CI no longer moves when the shared default does.
Shared CI default
| PR | Status / notes |
|---|---|
| apache/maven-gh-actions-shared#298 | merged — maven4-version default rc-5 → rc-6, base v4 |
| apache/maven-gh-actions-shared#299 | merged — same change, base v5 |
Maven core
| PR | Status / notes |
|---|---|
| #12674 | merged — wrapper job → rc-6 (master), plus commenting out the Google mirror |
| #12675 | merged — wrapper job → rc-6 (maven-4.0.x), plus commenting out the Google mirror |
| apache/maven-mvnd#1714 | merged — maven.version + wrapper distributionUrl, plus the resolver 2.0.21 / slf4j 2.0.18 / JLine 4.3.1 sync and the jline-terminal-jansi → jansi-core rename. The GraalVM native jobs fail on master too (stat@GLIBC_2.17), so that red is not from this change |
| apache/maven-resolver#2027 | merged — maven4Version |
| apache/maven-build-cache-extension#520 | merged — maven4.0 profile |
| apache/maven-executor#35 | merged — version.maven4 + CI pin |
Plugins and shared components
| PR | Status | Was on |
|---|---|---|
| apache/maven-clean-plugin#329 | merged | rc-5 |
| apache/maven-deploy-plugin#685 | merged | rc-5 |
| apache/maven-install-plugin#429 | merged | rc-5 |
| apache/maven-archiver#390 | merged | rc-5 |
| apache/maven-filtering#367 | merged | rc-5 |
| apache/maven-compiler-plugin#1104 | merged | rc-4 |
| apache/maven-jar-plugin#573 | merged | rc-4 — same change as my #574, which is closed as superseded |
| apache/maven-resources-plugin#500 | merged | rc-4 |
| apache/maven-source-plugin#268 | open, changes requested (by @sparsick, predates this effort) | beta-3 — a migration, not a bump. My duplicate #315 is closed in its favour |
| apache/maven-plugin-tools#1146 | merged | rc-4 |
| codehaus-plexus/plexus-xml#87 | merged | rc-5 (maven-xml dependency) |
Jenkins
| PR | Status / notes |
|---|---|
| apache/maven-jenkins-lib#22 | merged — provisions Maven on Jenkins through the wrapper (maven-wrapper-plugin:3.3.4:wrapper -Dmaven=${maven}, then ./mvnw), applying the pattern already used in maven-gh-actions-shared v5 |
| #12677 | merged — same change for apache/maven's own Jenkinsfile on maven-4.0.x: deploy through ./mvnw rather than the maven_3_latest Jenkins tool |
| apache/maven-clean-plugin#331 | merged — siteMvn was passed as a List, which stringifies to [4.0.x], misses the version mapping and silently ran the site stage on Maven 3 |
| apache/maven-compiler-plugin#1107 | merged — same fix, in the repo's inert Jenkinsfile.disable |
| apache/maven-install-plugin#430 | merged — same fix, in the repo's inert Jenkinsfile.disable |
| apache/maven-resources-plugin#501 | open — same fix, live Jenkinsfile |
| apache/maven-jar-plugin#575 | merged — same fix, live Jenkinsfile |
| apache/maven-jenkins-env#8 | merged — adds mvnVersionFromPattern, returning a concrete version (and null for anything unrecognised, so callers can fail loudly) |
| apache/maven-jenkins-lib#23 | merged — fixed a live breakage from #22: -Dmaven= was given the pattern 4.0.x, which the wrapper turns into apache-maven-4.0.x-bin.zip (404). Needs maven-jenkins-env#8 first |
CI-only version pins (3.x lines verifying against Maven 4)
| PR | Status | Was on |
|---|---|---|
| apache/maven-compiler-plugin#1105 | merged | rc-4 |
| apache/maven-mapping#58 | merged | rc-4 |
| apache/maven-shared-io#122 | merged | rc-2 |
Known blockers
The Google Cloud mirror of Central has not synced rc-6. apache-maven-4.0.0-rc-6-bin.zip is a 404 on maven-central.storage-download.googleapis.com/maven2 while repo.maven.apache.org serves it, and rc-5 is present on the mirror. .github/workflows/maven.yml pointed the wrapper there via MVNW_REPOURL, which broke the initial-build job on both core PRs; they now leave it unset so the wrapper downloads from Central. Note the same mirror is configured for dependency resolution in .github/ci-mimir-session.properties.
ASF Jenkins does not have 4.0.0-rc-6 installed — maven_4_latest still resolves to 4.0.0-rc-5 on the build nodes. apache/maven-jenkins-lib#22 and its follow-up #23 have both merged, so builds now provision Maven through the wrapper rather than depending on an installed tool, which removes the need for a per-release INFRA request. The node installation is tracked separately in INFRA-28215. Confirmed by rerunning all 93 master and 3.x jobs: 89 green. Worth noting only 4 of them had run at all since the library changed, so the green results that predated the rerun proved nothing — the rerun was the point.
apache/maven-jar-plugin#573 carries the same relocation fix. The version bump alone made JarMojoTest fail with expected: <foo> but was: <myGroupId>: rc-6's relocated MojoExtension only recognises the new annotation types, so with the deprecated org.apache.maven.api.plugin.testing names the @InjectMojo attributes come back null and the @Basedir pom is never read. It still compiles, which makes this a silent behavioural break for any plugin left on the old imports — worth knowing beyond this one repository.
apache/maven-resources-plugin#500 fixes the MRESOURCES-131 failure that the bump surfaced. It is not an rc-6 regression — the same assertion fails on rc-5. ResourcesMojo and TestResourcesMojo both declare a private skip field; they collapse into one descriptor parameter for testResources and the configurator writes the superclass field, so <skip>true</skip> never reaches the goal.
apache/maven-source-plugin#268 completes the migration from 4.0.0-beta-3 — the furthest behind of the 4-native plugins. maven-api-meta/maven-api-impl are replaced, and getCompileSourceRoots/getResources move onto the unified SourceRoot model with attachArtifact taking a ProducedArtifact. 10 unit tests pass and all 23 ITs pass. MSOURCES-140 needed a second commit: its assertion contained a literal " + File.separator + " inside a Groovy slashy regex, so it could never match, and it had been skipped on beta-3 via invoker.properties.
Status column last refreshed 2026-08-04. 34 of 35 merged; 1 open.
Open pull requests
- Update maven to 4.0.0-rc-6 maven-source-plugin#268 — checks green, changes requested: move the test harness off the deprecated
org.apache.maven.api.plugin.testing.*annotations, and take resources throughgetEnabledSourceRoots(..., Language.RESOURCES)rather than the deprecated model API
Everything else in this upgrade has merged.
The two branches that were failing on the old parent are fixed: apache/maven-reporting-api#77 (parent 34 -> 49, which brings an apache-rat that accepts the generated wrapper properties file) and apache/maven-reporting-impl#241 (dropping a doxia -SNAPSHOT that no longer resolves). Neither branch has been rebuilt yet.
Jenkins rerun of all 93 master and 3.x jobs — complete
89 green, 3 failures, 1 unstable. None of the four is caused by the rc-6 upgrade:
- maven-reporting-api-3.x — apache-rat rejects
.mvn/wrapper/maven-wrapper.properties, which the shared library now generates and which carries no licence header. Only bites branches on old parents; that branch is onmaven-shared-components:34, its ownmasteris on 49 and passes. - maven-reporting-impl-3.x — stale
doxia-sink-api:1.12.0-SNAPSHOT. - maven-surefire/master —
E2ETest.endToEndTest, no wrapper errors in the log. - maven-shared-utils/master — already unstable before the rerun.
maven-resources-plugin/master went green once #500 merged, which confirms the <skip> fix on master.
Activity
slachiewicz commentedon Aug 4, 2026
Status and remaining work
28 of 35 pull requests merged. Every repository that referenced a pre-rc-6 Maven 4 version is now either merged or has an open PR — there is nothing left to find.
Still open
Build native distributionjobs fail onmastertoo (undefined reference to stat@GLIBC_2.17on ubuntu-24.04-arm), so that red is not from this change; apache/maven-mvnd#1712 is the fix for it<skip>workaround for the shadowed-parameter bug, with aTODOpointing at #12626, which fixes the cause in the core configurator4.0.0-beta-3onto theSourceRootmodel; all 23 ITs passૂis decimal 2754 = U+0AC2, a Gujarati vowel sign, not U+2754)Jenkins verification in progress
All 93
masterand3.xjobs inmaven-boxwere rerun after the shared-library fixes landed. This mattered because only 4 of the 95 jobs had run at all since apache/maven-jenkins-lib#22 changed how Maven is provisioned — every other green result predated it.So far: 17 finished, all green; 76 still building; no failures.
The mechanism is confirmed working. From maven-clean-plugin master #57:
Note the node's own
maven_4_lateststill resolves to 4.0.0-rc-5 — the build runs on rc-6 purely through the wrapper. An INFRA request to install rc-6 on the build nodes is therefore no longer needed for these builds.Known issues that are not part of this upgrade
org.apache.maven.api.plugin.testingannotations still compile but are silently ignored by the relocatedMojoExtension, so a plugin that has not moved its imports keeps building and quietly stops reading its test POMs. Also coversProducedArtifactStub's shim losing its five-argument constructor.EnhancedCompositeBeanHelper.buildFieldCache()lets a parent field shadow a child's, which is what breaks<skip>ontestResources. Once released, the workaround in maven-resources-plugin#500 can be removed.maven_4_lateston the ASF build nodes still points at 4.0.0-rc-5. Not blocking anything now, but worth an INFRA ticket for anything that bypasses the wrapper.slachiewicz commentedon Aug 4, 2026
Jenkins rerun complete — 90 of 93 finished, 85 green
All
masterand3.xjobs inmaven-boxwere rerun after the shared-library fixes. Five did not come back green; here is what each one is, since only one of them is actually caused by this work.MRESOURCES-131FAILED, 26 ITs passedE2ETest.endToEndTestfailed. No wrapper or version-resolution errors in the log; #484 was green yesterdayCould not find artifact org.apache.maven.doxia:doxia-sink-api:jar:1.12.0-SNAPSHOTToo many files with unapproved license: 1The RAT failure is a side effect of provisioning the wrapper
Since apache/maven-jenkins-lib#22, every build generates the Maven wrapper into the workspace before building. That writes three files, and they are not equal in the eyes of apache-rat:
mvnw— carries an ASF licence headermvnw.cmd— carries an ASF licence header.mvn/wrapper/maven-wrapper.properties— no header, justwrapperVersion/distributionType/distributionUrlExactly one unlicensed file, which matches the count RAT reports.
It only fails where the RAT configuration does not exclude it.
maven-reporting-api-3.xinheritsmaven-shared-components:34, which predates the wrapper; the same repository'smasteris onmaven-shared-components:49and passes. So this will affect old maintenance branches on old parents, and leave modern branches alone — 1 job out of 93 here.Worth deciding how to handle it rather than leaving it to surface repo by repo:
maven-wrapper-pluginemit a licence header inmaven-wrapper.properties, which fixes it everywhere at once, orWhat the rerun did confirm
85 green, including every repository in this upgrade, on both
asfMavenTlpPlgnBuildandasfMavenTlpStdBuild, on Maven 3 and Maven 4 branches alike. Builds provision 4.0.0-rc-6 through the wrapper while the nodes still resolvemaven_4_latestto 4.0.0-rc-5.slachiewicz commentedon Aug 4, 2026
Checking which Maven 3 plugins already build on Maven 4
A separate, follow-on batch: rather than upgrading anything, these just turn on Maven 4 verification so we learn where the Maven 3 plugins stand ahead of GA. Same one-line change as apache/maven-javadoc-plugin#1350.
maven4-enabled: trueappends 4.0.0-rc-6 to the existing Maven 3 matrix — the plugin is still built and tested with Maven 3, and additionally checked against Maven 4. The shared workflow excludes the{jdk: 8, maven: 4.x}cell automatically.A red Maven 4 cell on any of these is the useful outcome — better found now than at GA.
Consistency fix on the Maven 4 side
Two of the Maven-4-native plugins hand-rolled the matrix instead of using the switch the shared workflow provides:
Same result, but the version stops being repeated in two places and re-pinned on every RC, and the
{jdk: 8}exclude comes for free rather than depending onjdk-matrixhappening to be[17, 21]. The other seven Maven 4 plugins — clean, install, deploy, compiler, source, archiver, filtering — already usemaven4-build.Audit notes
All 36 repositories currently passing
maven4-enabled: truewere checked against their POMs and are genuinely Maven 3 code (prerequisites3.6.3,mavenVersion3.9.x, nomaven-api-*dependencies), so the flag is right in every one.plugin-toolslooked like an exception at version4.0.0-beta-3-SNAPSHOT, but no module depends onmaven-api-*and it pins bothmaven3Versionandmaven4Version, somaven4-enabledis correct there too.One trap worth recording for anyone doing more of these: with
maven4-enabledthe shared workflow pipesmatrix-excludethroughjq, which rejects a trailing comma. Without the flag the value is echoed verbatim, so invalid JSON sits there harmlessly until the flag is added. Every repository in this batch was checked for it first.slachiewicz commentedon Aug 4, 2026
Results from turning on Maven 4 verification
Eight of the ten merged green, so those plugins build and test clean on 4.0.0-rc-6 with no changes: maven-acr-plugin#144, maven-toolchains-plugin#192, maven-scripting-plugin#80, maven-doap-plugin#164, maven-project-info-reports-plugin#645, maven-remote-resources-plugin#288, plus the two consistency fixes maven-resources-plugin#502 and maven-jar-plugin#576. maven-war-plugin#644 and maven-checkstyle-plugin#677 are still running.
Two turned up genuine Maven 4 problems. In both cases the failure is only on the
4.0.0-rc-6matrix cell — the Maven 3 cells that completed passed, and fail-fast cancelled the remainder. Neither is caused by the workflow change; it just made them visible, which was the point.maven-gpg-plugin#330 — the build POM gets signed
IT
sign-release-with-excludes, 12 passed / 1 failed:Maven 4 installs both a consumer POM and a
build.pom. The plugin signs the build POM too, so a-build.pom.ascappears that the IT's expected-file list — written before Maven 4 — does not know about.Two readings, and it is worth someone deciding which:
The second is the more interesting possibility and should be settled before GA, since it affects what every released artifact looks like.
maven-shade-plugin#837 — uber jar missing under Maven 4
IT
MSHADE-374_testJarArtifactSet, 83 passed / 1 failed:The uber jar is not produced. That IT covers
artifactSetwith a test-jar specifically, so artifact selection behaving differently under Maven 4 is the more likely cause than anything in the shading itself. Not diagnosed further.Both PRs are being left open with the failures on record, rather than reverted — the red cell is the finding.
slachiewicz commentedon Aug 8, 2026
Closing out the Maven 4 verification batch
Nine of the ten are merged; the tenth was closed as a duplicate. Both of the genuine Maven 4 failures reported above have moved, one of them only halfway.
maven-gpg-plugin#330 — merged, but only one of the two questions is settled
The IT side is fixed. apache/maven-gpg-plugin#332 teaches
sign-release-with-excludesabout the POM pair, and #330 was rebased on top of it and merged with all 17 jobs green, including all six4.0.0-rc-6cells — macOS, Ubuntu and Windows on both JDK 21 and 25. The cell that failed before (macos-latest jdk-21-zulu 4.0.0-rc-6) is green.That is the first of the two readings above. The second is still open: whether the build POM should be signed at all. #332 only taught the test what Maven 4 currently does; it did not decide that what Maven 4 currently does is right. If that question is later answered "no", the two lines to revert are the
test-1.0-build.pom/test-1.0-build.pom.ascentries added tosrc/it/sign-release-with-excludes/verify.groovy.Some detail from confirming the behaviour locally, since it narrows the question. Running the IT against Maven 4 and Maven 3.9.16 with a clean
targeteach time, the installed directory is:So the build POM is genuinely Maven-4-only, and those two files are the only difference — nothing else about the signed set changes. Note also that under Maven 4 the consumer POM is what occupies the plain
test-1.0.pomname, so a consumer resolvingtest:1.0gets the consumer POM and its signature either way. That is what makes the build POM signature arguable: it is an extra artifact a consumer does not normally fetch.One incidental find while fixing the IT: the
//maven4: skip consumer POMguard in that script had silently stopped matching anything. It was written for an earlier Maven 4 that installed the consumer POM as*-consumer.pom; the suffix now belongs to the build POM instead. Removed in #332. Worth checking for the same stale guard in any other repository that grew a Maven 4 workaround in that window.maven-shade-plugin#837 — closed, and the finding now has no PR carrying it
Closed on 5 August as a duplicate of apache/maven-shade-plugin#810 ("enable build with Maven 4"), which is still open. That means the uber-jar failure recorded above —
MSHADE-374_testJarArtifactSetproducing nomshade-374-uber-1.0.jarunder Maven 4 — is no longer attached to an open PR in this batch, so it is worth restating here so it does not get lost. apache/maven-shade-plugin#813 (<relativePath/>independency-reduced-pom.xmlcausing a false parent cycle under Maven 4) suggests shade has more than one Maven 4 problem to work through.The two that were still running
Both green and merged: apache/maven-war-plugin#644 and apache/maven-checkstyle-plugin#677.
Where the batch stands
Eight of these ten plugins build and test clean on 4.0.0-rc-6 with no product changes. One needed only a test taught about Maven 4. One has a real failure still to diagnose.