上周,我们在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的子目录.我还没有找到设置默认根目录的方法,这可能反过来影响所有这些变量.
解决方法
如果您希望在不同的位置使用.ivy运行,并且您正在使用sbt extras启动脚本,那么您应该能够:
sbt -ivy /path/to/ivy package
并且它会将所有常春藤内容下载到指定的位置并运行您需要的任何命令(在此示例中,包)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。