sbt修改为阿里云镜像

在~/.sbt/下添加一个repositories文件,里面内容如下:

PS:.sbt/文件一般在C:\Users\RYJ\ 下面,也可以使用类似Everything的工具快速搜索到。

[repositories]
local
aliyun: 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

如果只是在单个项目中修改的话,在build.sbt里添加

resolvers += "aliyun" at "http://maven.aliyun.com/nexus/content/groups/public/"

 

posted @ 2020-07-18 22:50  shuai7boy  阅读(872)  评论(0编辑  收藏  举报