Reputation: 6761
I have recently installed SBT on Windows XP SP3 machine to get started with Scala. When I started it initially, it started grabbing all the JAR's from the remote locations - pretty much like Maven or any other dependency management tool.
But, whenever I change my directory and fire up sbt
, it again starts downloading the entire solution. Is there a way of maintaining a global cache whereby artifacts are only downloaded once and not every time I change my working directory?
Upvotes: 7
Views: 4983
Reputation: 1348
In my case (Debian), every time I run sbt
it gets files from Getting org.scala-sbt sbt 0.13.16
. I was not having a local ivy2
catch. The solution was just to copy the .ivy2
folder in /root
to your user home /home/username
and give access permissions to user.
Upvotes: 1
Reputation: 16718
If you run the same version of sbt in a new directory, it will first look in the local ivy2 cache. It will still check all the resources, but will get them locally if they already exist.
However, if you are using SBT extras, it may re-download if you change to a different version of SBT, because it creates a cache for each version. That's my experience on Ubuntu in any case.
What you may have experienced is that some types of sbt plugins, for example sbt-idea, may download additional resources such as source repositories and documentation.
Upvotes: 7