SBT未进入交互模式

时间:2016-05-28 06:33:08

标签: scala sbt

我使用Homebrew安装了sbt并且安装正确。我能够构建项目并完成所有sbt任务。但是,当我尝试进入sbt交互模式时,它会显示以下内容并退出。对于其他一切,sbt工作正常。

[info] Set current project to sbt_test (in build file:/Users/binshi/sbt_test/)
[warn] The `-` command is deprecated in favor of `onFailure` and will be removed in 0.14.0
[warn] The `-` command is deprecated in favor of `onFailure` and will be removed in 0.14.0
[warn] The `-` command is deprecated in favor of `onFailure` and will be removed in 0.14.0
[warn] The `-` command is deprecated in favor of `onFailure` and will be removed in 0.14.0
[warn] The `-` command is deprecated in favor of `onFailure` and will be removed in 0.14.0

1 个答案:

答案 0 :(得分:0)

经过一番挖掘后,我发现我的错误来源是文件/ usr / local / etc / sbtopts。它最后由我安装的一些程序添加了以下行。

-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled XX:MaxPermSize=256M

每当sbt启动时,上面的行作为参数传递,导致上述错误。由于这些是解决它的java选项,我们可以在上面的行之前添加-J或完全删除该行。然后sbt应该开始正常工作。