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

Sbt加速_第1张图片

使用

  1. 命令行:命令后追加

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

Sbt加速_第2张图片

你可能感兴趣的:(sbt,scala)