Skip to content

Fix #1813: expect the Maven 3.9 classpath order in get-classpath IT - #1814

Open
arturobernalg wants to merge 1 commit into
apache:masterfrom
arturobernalg:fix/1813-get-classpath-maven39-order
Open

arturobernalg wants to merge 1 commit into
apache:masterfrom
arturobernalg:fix/1813-get-classpath-maven39-order

Conversation

@arturobernalg

@arturobernalg arturobernalg commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

#1813: the get-classpath IT's verify.groovy hard-coded the classpath order as [lib, dep, runtime, leaf], but that's only correct on Maven 3.10+/4 (Resolver 2.x). On Maven 3.9 and earlier (Resolver 1.x), a transitive dependency reached only through another dependency (the leaf, reached via dep) sorts before that dependency's own sibling (runtime), so the actual order is [lib, dep, leaf, runtime]. The goal itself is correct; the IT's expectation wasn't. CI only runs Maven 3.10/4, so this never showed up there, but it fails on Maven 3.9.16 which the plugin's own <prerequisites> still allows.

Build the expected order per Maven version, the same way the IT already does for the leaf's own version.
Reproduced the exact failure from the issue on real Maven 3.9.16 before the fix, confirmed it passes after.


To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
check one of the following:

…h IT

The get-classpath IT hard-coded the Maven 3.10/4 classpath order
(runtime before leaf). On Maven 3.9 and earlier (Resolver 1.x), a
transitive dependency reached only through another dependency sorts
before that dependency's direct siblings, so the actual order is leaf
before runtime. The goal was correct; the IT's expectation was not.

Build the expected order per Maven version, the same way the IT
already does for the leaf's own version.

Claude-Session: https://claude.ai/code/session_01BrsHTdDq7PD1DoqeA9vs66
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.

1 participant