[英]how can I change the coursier cache directory of the bundled sbt in IntelliJ
我已將本地 coursier 緩存遷移到系統的另一部分並更改了COURSIER_CACHE
系統屬性,如coursier 文檔中所述
通過 shell 以及 IntelliJ 的 sbt Z2591C98B70124B5E24,我在本地安裝的 SBT 可以正常工作但是,當使用 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 參數添加到
設置 > 構建執行部署 > sbt > VM 參數
沒有成功:
-Dcoursier.cache=<repo dir>
-Dsbt.coursier.home=<repo dir>
使用csrCacheDirectory
通過 IntelliJ 的 SBT shell 驗證這些設置表明它們被正確拾取,但構建錯誤仍然存在。
如何更改默認構建的 coursier 緩存目錄?
使用 Windows 10、IntelliJ CE 2021.1.1、SBT 1.5.1
謝謝,
干杯,Joost Papendorp
找到原因:IntelliJ 以某種方式在項目結構中保留了指向舊存儲庫的鏈接。 這顯然不是通過重新導入項目來解決的。
解決方案:刪除整個 Intellij 項目(不僅僅是模塊)。 關閉 IDE。 開始新項目。 重新導入模塊。
優雅。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.