I found the Resolving step usually takes long time when I run sbt compile
, such as this
[info] Resolving org.sonatype.oss#oss-parent;7 ...
Does anyone have ideas about what the resolving actually mean? And why is it necessary?
It is when ivy (which sbt uses for dependency management) looks through the dependency graph of the project to figure out all dependencies and transitive dependencies, and resolve any conflicts between those, for example, two dependencies might depend on different versions of the same library.
The result is cached, but is removed if you do a clean, so it will be recalculated on the next operation that needs to know the dependencies.
It is also possible to configure your project in ways which it so that sbt cannot cache the result but needs to redo those calculations every time you build, for example if you depend on snapshots and have configured sbt to update snapshots for every build.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With