lovezjt
lovezjt

Reputation: 43

How to avoid re-downloading the sbt dependency package when moving the sbt project to a new machine

If I move a sbt project like freedom to a new machine, the new project will re-download the sbt dependency packages. It costs me lots of time and moreover the new project can't run if the machine don't connect to Internet. I have move the .ivy2/cache to the machine, but it still fails to run. Who can tell me how to solve it? Must it re-download packages while moving to new machine?

Upvotes: 2

Views: 722

Answers (1)

Jack Koenig
Jack Koenig

Reputation: 6064

To expand on Thilo's comment:

SBT prior to 1.3 cached dependencies in ~/.ivy2/cache by default. As of 1.3, SBT uses Coursier for dependency resolution and caching which follows OS-specific caching standards described: https://get-coursier.io/docs/cache. You can set the cache yourself using the environment variable COURSIER_CACHE.

Upvotes: 1

Related Questions