【发布时间】:2021-07-24 15:48:27
【问题描述】:
我已将本地 coursier 缓存迁移到系统的另一部分并更改了 COURSIER_CACHE 系统属性,如 in the coursier docs 所述
我本地安装的 SBT 可以通过 shell 以及 IntelliJ 的 sbt shell 正常工作。但是,在使用 IntelliJ 的内置 SBT 使用 CTRL+F9 构建我的应用程序时,我收到以下错误:
scalac: Scala compiler JARs not found (module 'solipsism'): C:\Users\<user>\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-lang\scala-library\2.13.5\scala-library-2.13.5.jar, <etc>
C:\Users\<user>\AppData\Local\Coursier\cache 是默认的 coursier 缓存位置。
到目前为止,我尝试将以下 VM 参数添加到
Settings > Build Execution Deployment > sbt > VM Parameters
,但没有成功:
-Dcoursier.cache=<repo dir>
-Dsbt.coursier.home=<repo dir>
如in the SBT docs 和in the coursier docs again 所述
使用csrCacheDirectory 通过 IntelliJ 的 SBT shell 验证这些设置表明它们被正确拾取,但构建错误仍然存在。
如何更改默认构建的 coursier 缓存目录?
使用 Windows 10、IntelliJ CE 2021.1.1、SBT 1.5.1
谢谢,
干杯, 约斯特·帕彭多普
【问题讨论】:
标签: scala intellij-idea sbt