问题
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