2015-04-03 68 views
13

SBT我得到了這樣的錯誤,當我運行「SBT編譯」:運行與-Ylog-類路徑

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?

回答

17

-Y只是一個scalac參數。根據doc-Y是私人的和-X被推進有兩種類型。不同的是,私人的可以在沒有事先通知的情況下被移除,您應該知道這一事實。

要添加scalac選項添加到您的build.sbt文件這一行:

scalacOptions += "-Ylog-classpath" 

同樣可以用javacOptions添加javac選項。