加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

scala – 将sbt配置为不使用用户主目录

发布时间:2020-12-16 18:23:00 所属栏目:安全 来源:网络整理
导读:上周,我们在CI服务器上更改了用户目录权限,我们不再具有对用户主目录的写入权限.因此sbt无法启动,因为它无法使用以下堆栈跟踪写入?/ .ivy等. java.io.IOException: No such file or directory at java.io.UnixFileSystem.createFileExclusively(Native Metho
上周,我们在CI服务器上更改了用户目录权限,我们不再具有对用户主目录的写入权限.因此sbt无法启动,因为它无法使用以下堆栈跟踪写入?/ .ivy等.

java.io.IOException: No such file or directory
  at java.io.UnixFileSystem.createFileExclusively(Native Method)
  at java.io.File.createNewFile(File.java:1006)
  at xsbt.boot.Locks$.apply0(Locks.scala:34)
  at xsbt.boot.Locks$.apply(Locks.scala:28)
  at xsbt.boot.Launch.locked(Launch.scala:238)
  at xsbt.boot.Launch.app(Launch.scala:147)
  at xsbt.boot.Launch.app(Launch.scala:145)
  at xsbt.boot.Launch$.run(Launch.scala:102)
  at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
  at xsbt.boot.Launch$.launch(Launch.scala:117)
  at xsbt.boot.Launch$.apply(Launch.scala:18)
  at xsbt.boot.Boot$.runImpl(Boot.scala:41)
  at xsbt.boot.Boot$.main(Boot.scala:17)
  at xsbt.boot.Boot.main(Boot.scala)
 Error during sbt execution: java.io.IOException: No such file or directory

我知道我们可以设置一些sbt变量,例如the boot directory.我还没有找到我们可以配置的所有变量的确定列表,否则默认为user home的子目录.我还没有找到设置默认根目录的方法,这可能反过来影响所有这些变量.

任何人都可以指出如何配置sbt,使其不使用用户的主目录的任何文件?

解决方法

如果您希望在不同的位置使用.ivy运行,并且您正在使用sbt extras启动脚本,那么您应该能够:

sbt -ivy /path/to/ivy package

并且它会将所有常春藤内容下载到指定的位置并运行您需要的任何命令(在此示例中,包)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读