You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
get-classpath IT expects the Maven 3.10/4 classpath order and fails on Maven 3.9 #1813
The get-classpath IT fails on Maven 3.9.16, the line the plugin's <prerequisites> (3.9.0) allows. CI runs only Maven 3.10 and 4, so it does not show up there.
java.lang.AssertionError: Unexpected classpath:
get-classpath-lib-1.0.jar:get-classpath-lib-dep-1.0.jar:get-classpath-lib-leaf-1.0.jar:get-classpath-lib-runtime-1.0.jar,
expected:
get-classpath-lib-1.0.jar:get-classpath-lib-dep-1.0.jar:get-classpath-lib-runtime-1.0.jar:get-classpath-lib-leaf-1.0.jar
for Apache Maven 3.9.16
(local repository paths shortened)
The goal is right and the expectation is not. verify.groovy says the artifact is resolved "as for a project that depends on it, in the order of the running Maven's resolver". On Maven 3.9.16, a project that declares get-classpath-lib:1.0 as its only dependency gets the same order the goal printed:
So Maven 3.9 places the transitive leaf (via dep) before the direct runtime dependency, and Maven 3.10 and 4 place it after. The script already branches on the Maven version for the leaf version (2.0 on Maven 4, through the artifact's dependencyManagement); the expected order needs the same treatment.
Proposed fix: build expected per Maven version in src/it/projects/get-classpath/verify.groovy, with leaf before runtime for Maven 3.9.x. Comparing the entries as a set would hide the order, which is part of what the goal promises.
Reproduce: mvn -P run-its verify -Dinvoker.test=get-classpath with Maven 3.9.16.
Opened #1814 with the fix: builds the expected order per Maven version, the same way the IT already does for the leaf's own version. Reproduced the failure on real Maven 3.9.16 before the fix, confirmed it passes after.
Activity
arturobernalg commentedon Nov 18, 2026
Opened #1814 with the fix: builds the expected order per Maven version, the same way the IT already does for the leaf's own version. Reproduced the failure on real Maven 3.9.16 before the fix, confirmed it passes after.