一、補充sbt配置文件,添加下載路徑
文件結構如下:修改了sbtconfig.txt,repo.properties.
sbtconfig.txt配置內容為:
- # Set the java args to higssss
- -Xmx512M
- -XX:MaxPermSize=256m
- -XX:ReservedCodeCacheSize=128m
- # Set the extra SBT options
- -Dsbt.log.format=true
- -Dsbt.boot.directory=D:\sbt-repository\boot
- -Dsbt.global.base=D:\sbt-repository
- -Dsbt.ivy.home=D:\sbt-repository
- -Dsbt.repository.config=D:\sbt\conf\repo.properties
- -Dsbt.repository.secure=false
- [repositories]
- local
- Nexus osc : https://code.lds.org/nexus/content/groups/main-repo
- Nexus osc thirdparty : https://code.lds.org/nexus/content/groups/plugin-repo/
- typesafe: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
- typesafe2: http://repo.typesafe.com/typesafe/releases/
- sbt-plugin: http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/
- sonatype: http://oss.sonatype.org/content/repositories/snapshots
- uk_maven: http://uk.maven.org/maven2/
- ibibli: http://mirrors.ibiblio.org/maven2/
- repo2: http://repo2.maven.org/maven2/
- comp-maven:http://mvnrepository.com/artifact/
- store_cn:http://maven.oschina.net/content/groups/public/
- store_mir:http://mirrors.ibiblio.org/maven2/
- store_0:http://maven.net.cn/content/groups/public/
- store_1:http://repo.typesafe.com/typesafe/ivy-releases/
- store_2:http://repo2.maven.org/maven2/
- sbt-releases-repo: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
- sbt-plugins-repo: http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
- maven-central: http://repo1.maven.org/maven2/
完成配置,重啟sbt,等待,ok。就是更改了sbt的本地倉庫地址和中心倉庫地址。
補充阿里雲中心地址。
- [repositories]
- local
- aliyun-maven: http://maven.aliyun.com/nexus/content/groups/public/
- aliyun-ivy: http://maven.aliyun.com/nexus/content/groups/public/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
- typesafe: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
- sbt-plugin-ivy: http://dl.bintray.com/sbt/sbt-plugin-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
- dl-ivy: http://dl.bintray.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
- sonatype-oss-releases
- maven-central
二、下載慢的jar包,復制路徑用其他下載工具下載

啟動sbt
復制正在下載的jar路徑,如:
https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.11.8/scala-library-2.11.8.jar
把下載的jar包,復制到D:\sbt-repository\cache\
org.scala-lang\scala-library\jars對應的目錄下面

三、sbt資源庫離線包下載路徑
sbt-0.13.15資源庫離線包下載路徑(已經下載好sbt、sbteclipse、assembly所需支持包),下載地址:鏈接:http://pan.baidu.com/s/1pLluQG7 密碼:0m77