2017年2月16日星期四

配置sbt镜像

sbt默认的镜像经常下载失败,简单查了一下设置其他镜像的方法:

修改系统环境变量:export SBT_OPTS="-Dsbt.override.build.repos=true"

vim ~/.sbt/repositories,增加:
[repositories]
    local
    repo2:http://repo2.maven.org/maven2/
    ivy-typesafe:http://dl.bintray.com/typesafe/ivy-releases, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
    ivy-sbt-plugin:http://dl.bintray.com/sbt/sbt-plugin-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]

没有深入研究,有空再系统看下。

下面的链接给了一些镜像,可以试下效果:
http://www.jianshu.com/p/c8c48b0b3866
https://gist.github.com/ysrotciv/267f05270a2cfab084c123316c0a82ee

没有评论:

发表评论