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?
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.