Fix skinny-wars-timestamp IT under Maven 4 (settings.xml RRF id collision)#502
Fix skinny-wars-timestamp IT under Maven 4 (settings.xml RRF id collision)#502ascheman wants to merge 1 commit into
Conversation
The skinny-wars-timestamp IT failed under Maven 4.0.0-rc-5 with 'Path eartest/jar-sample-one/... NOT allowed from central'. Maven 4's Remote Repository Filtering applies an auto-discovered 'central' prefix list to any repository whose <id> is exactly 'central' — and the IT fixture's <id>local.central</id> collides with that filter. Rename the two <id>local.central</id> occurrences in src/it/settings.xml to <id>local.it</id>. Production plugin code is unchanged; only the IT fixture. This fixes the IT independently of any further work on Maven Resolver RRF semantics (cstamas confirmed the RRF diagnosis in apache#478). PR apache#499 flips maven4-enabled in CI but does not fix the underlying IT — this fix lets PR apache#499's matrix turn green. Verified: mvn verify -P run-its against Maven 4.0.0-rc-5 — Passed: 18, Failed: 0, Errors: 0, Skipped: 0. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
If |
No it's not https://github.com/apache/maven-ear-plugin/blob/master/src/it/settings.xml |
|
@cstamas after deeper investigation triggered by your question, the diagnosis in the PR body turned out to be wrong. There is no RRF / Will follow up with the full writeup once I've landed the workspace fix; sorry for the noise. |
Summary
The
skinny-wars-timestampintegration test is the single IT failing under Maven 4.0.0-rc-5 (and againstapache/mavenmaster snapshot) on master, which leaves PR #499 ("enable build with Maven 4") with a redmacos-latest jdk-21rc-5 lane and cancelled siblings. This PR fixes the IT fixture so the rc-5 matrix turns green.Root cause
Maven 4 (via Maven Resolver 2's Remote Repository Filter) ships an auto-discovered "central" prefix list and applies it to any repository whose
<id>is exactlycentral. The IT'ssrc/it/settings.xmldeclares both a<repository>and a<pluginRepository>with<id>local.central</id>— the exact id collides with the prefix-filter machinery. The result: when the IT installs the test artifacteartest:jar-sample-oneinto the local IT repository, the nested Maven build tries to resolve it fromlocal.centraland the RRF rejects the lookup with:The bug is entirely in the IT fixture; the production
MavenEarPluginis unaffected. Background context exists in #478 (cstamas confirmed the RRF diagnosis).Fix
Rename both
<id>local.central</id>occurrences insrc/it/settings.xmlto<id>local.it</id>. Two lines changed.Verification
mvn -P run-its verifyagainst Maven4.0.0-rc-5(sdkman, JDK 17.0.18 Temurin / macOS aarch64): Passed: 18, Failed: 0, Errors: 0, Skipped: 0.Path ... NOT allowed from centralerror PR Enable Maven 4 build #499's CI shows.Context
maven4-enabled: true).<id>.cc @Bukama @cstamas