![]() ![]() You can use mvn dependency:tree to visualize the dependency tree. Please refer to this post for how Maven chooses the closest dependency: I ended up having to add C 2.0 to my pom.xml so that it can be chosen over C 1.0. ![]() C 2.0 is indeed installed and your IDE knows about it, but it's just ignored when running the application. Now the weird thing is: if you navigate the code of B in your IDE and try to jump to the class that only exists in C 2.0, it works correctly. As a result, when B tries to use the class that only exists in C 2.0, a ClassNotFoundException is thrown.However, A is "closer" in the dependency tree, so Maven uses C 1.0 for both A and B and doesn't even warn you about this (it's quite astounding to me).B makes use of a class that only exists in C 2.0.Let's say A depends on C 1.0 and B depends on C 2.0 The pages below will provide additional details about these errors. ![]() These errors can be a helpful debugging aid, but the reported problem isn't always immediately clear. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |