Sbt retrieveManaged does not pick up jars created using publish-local

Let's say I have a project where I used sbt publish-local

to create local copies of jar files in ~/.ivy2/local

.

Another sbt project on the same machine can successfully find these jars to satisfy the dependencies. However, if I use the option in this project retrieveManaged := true

, sbt never copies jars from ~/.iv2/local

to directory lib_managed

.

How can i do this? (Is this behavior intended?)

(I am using sbt 0.12.1.)

+3


source to share


1 answer


I am using the same setup. When I update my locally published dependencies, I first remove the managed jars and then run the update:

$ rm -r lib_managed/jars/my-package-prefix
$ sbt test:compile

      

( test:compile

finds out that the jars are missing, but he himself update

).



In older versions of sbt, I believe there was a problem using the versions -SNAPSHOT

, but I never saw this problem again with sbt 0.12.

In rare situations, something messes up with the Ivy cache and somehow you can't provide an update. This may be the case where the Ivy metadata files were corrupted. Then the only solution is to erase all occurrences of your dependency from ~/.ivy2/local

and ~/.ivy2/cache

, re-publish and re-update.

+2


source







All Articles