第五章 SBT国内源配置

参考

网上找了许多,都是oschina的源,阿里的源也试了,都很慢。最终修改源列表如下,半分钟就好了。具体是哪一行发生了作用,就不清楚了。

~/.sbt$ cat repositories
[repositories]
local
aliyun-nexus: http://maven.aliyun.com/nexus/content/groups/public/  
ibiblio-maven: http://maven.ibiblio.org/maven2/
typesafe-ivy: https://dl.bintray.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
uk-repository: http://uk.maven.org/maven2/
jboss-repository: http://repository.jboss.org/nexus/content/groups/public/

osc: http://maven.oschina.net/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

测试一下,启动迅速,再也不用等待了。

~/.sbt$ sbt
[info] Set current project to root--sbt (in build file:/home/bit/.sbt/)
> 

==============
20170115更新
在sbt编译spark的时候又报错了,连不上服务器。精简一下文件,不是越多越好,直接定位到阿里云提供的源即可。

$ dpkg -L sbt
/usr/share/sbt-launcher-packaging/conf/sbtopts
/usr/share/sbt-launcher-packaging/conf/sbtconfig.txt

这两个文件增加一行,让源生效:
-Dsbt.override.build.repos=true
$ cat repositories
[repositories]
local
aliyun-nexus: 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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容