【问题标题】:Run sbt with -Ylog-classpath使用 -Ylog-classpath 运行 sbt
【发布时间】:2015-06-08 03:18:14
【问题描述】:

我在运行 '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?

【问题讨论】:

    标签: scala sbt


    【解决方案1】:

    -Y 只是一个scalac 参数。根据doc -Y 私有和-X 高级有两种类型。不同之处在于可以在不事先通知的情况下删除私有的,您应该注意这一事实。

    要添加scalac 选项,请在您的build.sbt 文件中添加这一行:

    scalacOptions += "-Ylog-classpath"
    

    同样,您可以使用javacOptions 添加javac 选项。

    【讨论】:

      猜你喜欢
      • 2016-02-10
      • 2016-02-01
      • 2015-09-30
      • 2013-03-06
      • 1970-01-01
      • 2020-11-11
      • 2015-03-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多