使用 -Ylog-classpath 运行 sbt [英] Run sbt with -Ylog-classpath
本文介绍了使用 -Ylog-classpath 运行 sbt的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我运行'sbt compile'时出现这样的错误:
I got an error like this when I run '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?
How can I pass -Ylog-classpath
to sbt?
推荐答案
-Y
只是一个 scalac
参数.根据 doc -Y
是私有的,-X
是高级的.不同之处在于私人的可以在没有事先通知的情况下被删除,你应该意识到这一点.
-Y
is just a scalac
parameter. There are two types as per the doc -Y
being private and -X
being advanced. The difference is that private ones can be removed without prior notice and you should be aware of that fact.
要添加 scalac
选项,请将此行添加到您的 build.sbt
文件中:
To add scalac
options add to your build.sbt
file this line:
scalacOptions += "-Ylog-classpath"
同样,您可以使用 javacOptions
添加 javac
选项.
Similarly you can add javac
options with javacOptions
.
这篇关于使用 -Ylog-classpath 运行 sbt的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文