第五章 SBT國(guó)內(nèi)源配置

參考

網(wǎng)上找了許多,都是oschina的源,阿里的源也試了,都很慢。最終修改源列表如下,半分鐘就好了。具體是哪一行發(fā)生了作用,就不清楚了。

~/.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

測(cè)試一下,啟動(dòng)迅速,再也不用等待了。

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

==============
20170115更新
在sbt編譯spark的時(shí)候又報(bào)錯(cuò)了,連不上服務(wù)器。精簡(jiǎn)一下文件,不是越多越好,直接定位到阿里云提供的源即可。

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

這兩個(gè)文件增加一行,讓源生效:
-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

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容