How to configure Ivy cache directory per-user or system-wide?

前端 未结 7 1131
说谎
说谎 2020-12-02 09:38

I am using SBT as my build tool for building a Scala project.

My problem is, I can\'t configure SBT to download dependencies to my user home directory. Therefore I a

7条回答
  •  鱼传尺愫
    2020-12-02 09:57

    For editing the cache location during the SBT boot itself, see Sbt Launcher Configuration in the official documentation.

    Basically, to get it to work system-wide, you'd have to:

    • Put a configuration file named sbt.boot.properties somewhere where it's accessible system-wide (the default one is listed at the link above).
    • Call the launcher with the additional system property sbt.boot.properties set to point to your configuration file.
    • Set the cache-directory entry (in the [ivy] section) to the location of your ivy cache.

    This configuration doesn't seem to carry over to normal SBT usage, though, unfortunately.

提交回复
热议问题