Skip to content

Fix skinny-wars-timestamp IT under Maven 4 (settings.xml RRF id collision)#502

Closed
ascheman wants to merge 1 commit into
apache:masterfrom
aschemaven:mvn4-rc5-skinny-wars-timestamp-rrf
Closed

Fix skinny-wars-timestamp IT under Maven 4 (settings.xml RRF id collision)#502
ascheman wants to merge 1 commit into
apache:masterfrom
aschemaven:mvn4-rc5-skinny-wars-timestamp-rrf

Conversation

@ascheman

@ascheman ascheman commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

The skinny-wars-timestamp integration test is the single IT failing under Maven 4.0.0-rc-5 (and against apache/maven master snapshot) on master, which leaves PR #499 ("enable build with Maven 4") with a red macos-latest jdk-21 rc-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 exactly central. The IT's src/it/settings.xml declares 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 artifact eartest:jar-sample-one into the local IT repository, the nested Maven build tries to resolve it from local.central and the RRF rejects the lookup with:

ArtifactFilteredOutException: Path eartest/jar-sample-one/... NOT allowed from central

The bug is entirely in the IT fixture; the production MavenEarPlugin is unaffected. Background context exists in #478 (cstamas confirmed the RRF diagnosis).

Fix

Rename both <id>local.central</id> occurrences in src/it/settings.xml to <id>local.it</id>. Two lines changed.

Verification

  • mvn -P run-its verify against Maven 4.0.0-rc-5 (sdkman, JDK 17.0.18 Temurin / macOS aarch64): Passed: 18, Failed: 0, Errors: 0, Skipped: 0.
  • Before the fix the same invocation reproduces the Path ... NOT allowed from central error PR Enable Maven 4 build #499's CI shows.

Context

  • Unblocks Enable Maven 4 build #499 (CI matrix flip to maven4-enabled: true).
  • Independent of any Maven Resolver RRF semantics changes — this is the IT fixture being too "central"-like in its <id>.
  • No production code change; no POM/dependency bump.

cc @Bukama @cstamas

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>
@cstamas

cstamas commented Jun 9, 2026

Copy link
Copy Markdown
Member

If local.central collides/matches with central ID, this is unexpected. Maybe even a RRF bug? Is local.central mirrorOf central maybe?

@Bukama

Bukama commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

If local.central collides/matches with central ID, this is unexpected. Maybe even a RRF bug? Is local.central mirrorOf central maybe?

No it's not

https://github.com/apache/maven-ear-plugin/blob/master/src/it/settings.xml

@ascheman

ascheman commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

@cstamas after deeper investigation triggered by your question, the diagnosis in the PR body turned out to be wrong. There is no RRF / local.central collision at play; the ear-plugin sources need no change for 4.0.0-rc-5. Moving this PR back to draft while I sort out the real root cause on my side (workspace-level split-local-repository quirk, not a plugin issue).

Will follow up with the full writeup once I've landed the workspace fix; sorry for the noise.

@ascheman ascheman marked this pull request as draft June 9, 2026 18:57
@ascheman ascheman closed this Jun 9, 2026
@ascheman ascheman deleted the mvn4-rc5-skinny-wars-timestamp-rrf branch June 9, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants