i have a question about the classloading order with maven.
I know, since maven version 2.0.9 the classloading has been deterministic an uses the order in the pom. I am not clear about the transitive dependencies. Does maven load all top level dependencies first and then the transitive dependencies. Or load a top level dependencies with all transitive dependencies and then load the next top level dependency.
I know in a fully correct maven setup there is no problem with the order but I have some duplicated classes in a dependency and I want to know which one is used. Excluding the transitive dependency is no option, because not all classes are covered in both jars.
For example: My project has three dependencies A, B and C. A has a transitive dependency to C. Which is the maven order to load the dependencies?
POM:
- A
- C
- B
- C
Case A:
A --> B --> C
Case B: A --> (transitive dependency) C --> B --> C
Thank you