美文网首页
解决sbt慢的问题(OSX)

解决sbt慢的问题(OSX)

作者: Hanze2111 | 来源:发表于2016-11-26 22:22 被阅读2223次

sbt真是慢出翔啊,没法忍,开代理也是慢的一比,网上各种教程也尼玛不太行,搞了一晚上,记录下来。

Terminal

就按照我说的来别问为什么,我也不知道。

  • ~/.sbt下面创建repositories文件,内容如下:
[repositories]
local
osc: http://maven.aliyun.com/nexus/content/groups/public/
typesafe: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
sonatype-oss-releases
maven-central
sonatype-oss-snapshots
  • 打开终端,进入工程目录,有build.sbt那个
  • 执行sbt -Dsbt.override.build.repos=true
  • 执行console

IDEA

  • 在最开始的页面, 就是没打开任何工程的地方,右下角点Configure
  • 点Preference 左上角搜sbt
  • 点开sbt,VM parameter那添加-Dsbt.override.build.repos=true
  • Launcher那选择custom,添加自己的sbt,我的目录是/usr/local/Cellar/sbt/0.13.13/libexec/sbt-launch.jar
  • 如果版本不一致可修改工程里面的build.properties

晚上扫了一眼任正非的《我的父亲母亲》真是感动的不行。

相关文章

网友评论

      本文标题:解决sbt慢的问题(OSX)

      本文链接:https://www.haomeiwen.com/subject/wpmgpttx.html