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

scala – 使用-Ylog-classpath运行sbt

发布时间:2020-12-16 19:01:00 所属栏目:安全 来源:网络整理
导读:当我运行’sbt compile’时,我收到一个这样的错误: missing or invalid dependency detected while loading class file 'DefaultReads.class'.[error] Could not access term time in package java,[error] because it (or its dependencies) are missing.
当我运行’sbt compile’时,我收到一个这样的错误:

missing or invalid dependency detected while loading class file 'DefaultReads.class'.
[error] Could not access term time in package java,[error] because it (or its dependencies) are missing. Check your build definition for
[error] missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.)

如何将-Ylog-classpath传递给sbt?

解决方法

-Y只是一个scalac参数.根据 doc -Y有两种类型是私有的,-X是高级的.不同的是,私人的可以被删除,恕不另行通知,你应该知道这个事实.

添加scalac选项添加到您的build.sbt文件这行:

scalacOptions += "-Ylog-classpath"

类似地,您可以使用javacOptions添加javac选项.

(编辑:李大同)

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

    推荐文章
      热点阅读