sbt 下载时卡住 [英] sbt stuck while downloading

查看:57
本文介绍了sbt 下载时卡住的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几天前我开始学习Scala.我想使用 sbt 进行依赖项管理,但是当我在控制台中启动 sbt 时,它需要大约 1 小时来解析和下载所有依赖项.

a couple days ago i started to learn scala. I want to use sbt for the dependency management but when i start sbt in my console it need round about 1h to resolving and downloading all dependencies.

我在 google 上的搜索没有成功,所以我希望有人可以帮助我加快 sbt.

My search at google was unsuccessfull so i hope somebody can help me to speed up sbt.

我的 build.sbt

My build.sbt

name := "hello"

version := "1.0"

scalaVersion := "2.11.2"

scalacOptions := Seq("-unchecked", "-deprecation", "-encoding", "utf8")

libraryDependencies ++= {
val akkaV = "2.3.5"
val sprayV = "1.3.1"
Seq(
    "io.spray" %% "spray-can" % sprayV,
    "io.spray" %% "spray-routing" % sprayV,
    "io.spray" %% "spray-testkit" % sprayV % "test",
    "com.typesafe.akka" %% "akka-actor" % akkaV,
    "com.typesafe.akka" %% "akka-testkit" % akkaV % "test",
    "org.specs2" %% "specs2-core" % "2.3.11" % "test"
)
}

我使用 Mac OS X 10.8 和 java 1.8.20

I use Mac OS X 10.8 with java 1.8.20

问候

指挥官

推荐答案

哈哈哈 欢迎来到 sbt 地狱!!我发现一个技巧是中断(ctrl + c)进程并重新启动它.它有时似乎卡住了,需要一脚踢.多亏了缓存,它会从停止的地方继续.

Hahaha welcome to sbt hell!! I find one trick is to interupt (ctrl + c) the process and restart it. It somtimes seems to get stuck and needs a kick. It will pick up where it left off thanks to the cache.

幸运的是,通常只有第一次运行它需要那么长时间.直到你改变你的依赖关系!!

Fortunately its usually only the first time you run it it takes that long. Until you change your dependencies that is!!

这篇关于sbt 下载时卡住的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆