A rather recent new "feature" in sbt, perhaps 0.13.7 or 0.13.8, is a very annoying behaviour that transitive dependencies are not found any longer.
For example. I have a project A that depends on library B version 1.25.1 that depends on library C version 1.13.1. Only library dependency B is defined in A, naturally, because I don't want to define the whole tree of dozens of sub-libraries. Ok, this builds.
Now I update the dependency in A to become library B version 1.25.2 which in turn depends on library C version 1.13.2. Now sbt complains with the rather useless message "configuration not found in library-C;1.13.2: 'master'. It was required from library-B;1.25.2 compile", followed by an "unresolved dependency" exception. Sbt doesn't even bother to download library C version 1.13.2 from Maven Central or in fact find it already published locally. The only way to "solve" this is to add a depenency on library C version 1.13.2 to project A, which is precisely what I don't want to do.
Here is an example print out:
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: de.sciss#scalacolliderugens-core_2.11;1.13.2: configuration not found in de.sciss#scalacolliderugens-core_2.11;1.13.2: 'master'. It was required from de.sciss#scalacolliderswing-core_2.11;1.25.2 compile
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] de.sciss:scalacolliderugens-core_2.11:1.13.2
[warn] +- de.sciss:scalacolliderugens-plugins_2.11:1.13.2
[warn] +- de.sciss:scalacolliderswing-core_2.11:1.25.2 (/home/hhrutz/Documents/devel/SoundProcesses/build.sbt#L167)
[warn] +- de.sciss:soundprocesses-compiler_2.11:2.20.0-SNAPSHOT
I suppose this is an annoying bug in sbt, or is there some deeper reasoning behind the failure to resolve transitive dependencies that I fail to understand?
The problem even came back a while after I had added library C explicitly. As often, the final solution was this:
$ rm -r ~/.ivy2/cache/
$ rm -r ~/.ivy2/local/
And then download the Internet again.
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