Scala stack试玩, 提高第三方依赖下载速度

原文地址: http://segmentfault.com/a/1190000002894524
sbt下载速度实在是惨不忍睹, 需要做些配置优化

下载typesafe离线包, 保存为ivy本地库

wget http://downloads.typesafe.com/typesafe-activator/1.3.4/typesafe-activator-1.3.4.zip
解压repository目录到~/.ivy2,重命名为local

私有nexus库增加以下库

#proxy库
typesafe-ivy-releases: http://dl.bintray.com/typesafe/ivy-releases/
typesafe-maven-releases: http://dl.bintray.com/typesafe/maven-releases/
typesafe-sbt-plugin-releases: http://dl.bintray.com/sbt/sbt-plugin-releases/

#group库
ivy-releases : typesafe-ivy-releases,typesafe-sbt-plugin-releases
创建文件/Users/oznyang/.sbt/repositories

[repositories]
  local
  maven-local: file:///{改成你用户主目录, 绝对路径}/.m2/repository/
  nexus-maven: http://dev.xxx.com/nexus/content/groups/public/
  nexus-ivy: http://dev.xxx.com/nexus/content/groups/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
禁止自定义仓库配置

echo -e '-mem 512\n-Dsbt.override.build.repos=true'>>/usr/local/etc/sbtopts
注意ivy库要关掉index下载

输入详细日志

set logLevel := Level.Debug
show external-resolvers
show boot-resolvers
show resolvers

你可能感兴趣的:(scala,sbt)