Run sbt with -Ylog-classpath

微笑、不失礼 提交于 2019-12-22 02:31:16

问题


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.)

How can I pass -Ylog-classpath to sbt?


回答1:


-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.

To add scalac options add to your build.sbt file this line:

scalacOptions += "-Ylog-classpath"

Similarly you can add javac options with javacOptions.



来源:https://stackoverflow.com/questions/29425311/run-sbt-with-ylog-classpath

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!