第五章 SBT国内源配置
2017-01-14 本文已影响0人
比特阳
参考
网上找了许多,都是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