当我运行' 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?
答案 0 :(得分:22)
-Y
只是scalac
参数。根据{{3}} -Y
为私有,-X
为高级,有两种类型。不同之处在于私人可以在不事先通知的情况下删除,您应该知道这一事实。
要添加scalac
个选项,请在此行添加build.sbt
文件:
scalacOptions += "-Ylog-classpath"
同样,您可以使用javac
添加javacOptions
个选项。