sbt默认使用的是国外的源,速度太慢,因此改为国内的源。 1.修改下面两个文件,在末尾添加-Dsbt.override.build.repos=true
/usr/share/sbt/conf/sbtconfig.txt
/usr/share/sbt/conf/sbtopts
2.vim ~/.sbt/repositories
如果不存在则创建
hys@hys:~$ cat ~/.sbt/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
3.生效。