Sbt加速

修改repository代理

  • 文件位置: ~/.sbt/repository

[repositories]
  local
  oschina:http://maven.oschina.net/content/groups/public/
  oschina-ivy:http://maven.oschina.net/content/groups/public/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
  repo2:http://repo2.maven.org/maven2/
  ivy-typesafe:http://dl.bintray.com/typesafe/ivy-releases, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
  ivy-sbt-plugin:http://dl.bintray.com/sbt/sbt-plugin-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
  typesafe-releases: http://repo.typesafe.com/typesafe/releases
  typesafe-ivy-releasez: http://repo.typesafe.com/typesafe/ivy-releases, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]

设置本地repositories

  1. 下载 Lightbend Activator

    http://www.scala-lang.org/download/
    
  2. 解压

  3. 将根目录的repository文件夹复制到~/.ivy2, 并更名为local

图片描述

使用

  1. 命令行:命令后追加

    -Dsbt.override.build.repos=true
  2. IntelliJ IDEA:Preferences -> Build -> Build Tools -> SBT -> JVM Options -> VM parameters

图片描述

阅读 5k

推荐阅读
人工智能之路
用户专栏

一只笨鸟的人工智能之路

5 人关注
25 篇文章
专栏主页