Classpaths are a linear representation, trees are nested. Maven should be trying to keep the root level dependencies first in the classpath as they are closest so should be resolved first.
From your output though this looks odd alright, I am not seeing what I would expect as normal logic re-classpath construction.
Additionally up until the 2.6 release of the dependency plugin, on Maven 3.x the dependency:tree
output was incorrect. I wonder if there is a bug in build-classpath
from the same root cause. I would ping this question to users@maven.apache.org to see if anyone (Hervé who fixed dependency:tree
) knows the answer...