MainModule ├── DepModule │ └── Av1.jar ← my.example.A (will be used at runtime!) └── Av2.jar ← my.example.A (used at compile time)The IDE resolves
A from Av2, but the JVM loads it from Av1.
Calling a method that exists only in Av2 causes NoSuchMethodError.
Av2 before DepModule so both compile and runtime use the same class.