DEV Community

Discussion on: Build, compile, run: A crash course in classpaths

Collapse
 
pmgysel profile image
Philipp Gysel

Great post Tony!๐Ÿ™Œ I've used tools like Maven and IntelliJ a lot, but sometimes when specific errors happen, it's really helpful to know about the classpaths and loaders!

I didn't know you can use footnotes on DEV, very nice๐Ÿ˜€

One topic I really hope you will cover in future posts: What to do when 2 dependencies pull in the same dependency X but with different versions? I had some pains with this in the past and I had to hack around to solve it...

Collapse
 
autonomousapps profile image
Tony Robalik

Could you be more specific?

A great tool for diagnosing classpath issues is Gradle build scans. You may not be aware, but they're also available for Maven!

Collapse
 
pmgysel profile image
Philipp Gysel

Hey Tony, thanks for getting back to me! So the issue was related to diagnostic sure. I had one specific situation where one dependency A required a specific dependency B but this dependency B was also pulled in transitively somewhere else, with a newer version that was incompatible for A. Does this make sense..?๐Ÿค“

Thread Thread
 
autonomousapps profile image
Tony Robalik

This has to do with gradle dependency resolution, which is somewhat outside the scope of this series. Gradle generally will pull in the most recent version that is requested by any part of the dependency graph. There are many ways to tell Gradle which version to finally resolve. A good starting point is docs.gradle.org/current/userguide/..., and you can also join the gradle community slack and ask for help.