删除.ivy文件夹后,Sbt卡在“更新ProjectRef”上

时间:2019-06-26 06:31:35

标签: scala sbt

删除我的.ivy文件夹后,我无法进入SBT shell,因为它卡在了:

[info] Loading global plugins from /home/baierlf/.sbt/1.0/plugins
[info] Updating ProjectRef(uri("file:/home/baierlf/.sbt/1.0/plugins/"), "global-plugins")...

[info] Done updating.永远不会出现。

我注意到新创建的~/.ivy文件夹包含一个文件:.sbt.ivy.lock。您知道如何解决此问题吗?

更新:

等待约20分钟后出现很多ava.net.SocketTimeoutException: connect timed out错误,失败了。

[info] Loading global plugins from /home/baierlf/.sbt/1.0/plugins
[info] Updating ProjectRef(uri("file:/home/baierlf/.sbt/1.0/plugins/"), "global-plugins")...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.scala-lang#scala-library;2.12.7: Resolution failed several times for dependency: org.scala-lang#scala-library;2.12.7 {scala-tool=[default, optional(default)], provided=[default(compile)]}:: 
[warn]  typesafe-ivy-releases: unable to get resource for org.scala-lang#scala-library;2.12.7: res=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-library/2.12.7/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[warn]  sbt-plugin-releases: unable to get resource for org.scala-lang#scala-library;2.12.7: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-lang/scala-library/2.12.7/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[warn]  public: unable to get resource for org/scala-lang#scala-library;2.12.7: res=https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.7/scala-library-2.12.7.pom: java.net.SocketTimeoutException: connect timed out
[warn]  :: org.scala-sbt#sbt;1.2.8: Resolution failed several times for dependency: org.scala-sbt#sbt;1.2.8 {provided=[default(compile)]}:: 
[warn]  typesafe-ivy-releases: unable to get resource for org.scala-sbt#sbt;1.2.8: res=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/1.2.8/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[warn]  sbt-plugin-releases: unable to get resource for org.scala-sbt#sbt;1.2.8: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-sbt/sbt/1.2.8/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[warn]  public: unable to get resource for org/scala-sbt#sbt;1.2.8: res=https://repo1.maven.org/maven2/org/scala-sbt/sbt/1.2.8/sbt-1.2.8.pom: java.net.SocketTimeoutException: connect timed out
[warn]  :: org.scala-lang#scala-compiler;2.12.7: Resolution failed several times for dependency: org.scala-lang#scala-compiler;2.12.7 {scala-tool=[default, optional(default)]}:: 
[warn]  typesafe-ivy-releases: unable to get resource for org.scala-lang#scala-compiler;2.12.7: res=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-compiler/2.12.7/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[warn]  sbt-plugin-releases: unable to get resource for org.scala-lang#scala-compiler;2.12.7: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-lang/scala-compiler/2.12.7/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[warn]  public: unable to get resource for org/scala-lang#scala-compiler;2.12.7: res=https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.12.7/scala-compiler-2.12.7.pom: java.net.SocketTimeoutException: connect timed out
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[warn]  Note: Unresolved dependencies path:
[warn]      org.scala-lang:scala-library:2.12.7 ((sbt.Classpaths.jvmBaseSettings) Defaults.scala#L2207)
[warn]        +- org.scala-sbt:global-plugins:0.0 (scalaVersion=2.12, sbtVersion=1.0)
[warn]      org.scala-sbt:sbt:1.2.8
[warn]        +- org.scala-sbt:global-plugins:0.0 (scalaVersion=2.12, sbtVersion=1.0)
[warn]      org.scala-lang:scala-compiler:2.12.7
[warn]        +- org.scala-sbt:global-plugins:0.0 (scalaVersion=2.12, sbtVersion=1.0)
[error] sbt.librarymanagement.ResolveException: unresolved dependency: org.scala-lang#scala-library;2.12.7: Resolution failed several times for dependency: org.scala-lang#scala-library;2.12.7 {scala-tool=[default, optional(default)], provided=[default(compile)]}:: 
[error]     typesafe-ivy-releases: unable to get resource for org.scala-lang#scala-library;2.12.7: res=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-library/2.12.7/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[error]     sbt-plugin-releases: unable to get resource for org.scala-lang#scala-library;2.12.7: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-lang/scala-library/2.12.7/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[error]     public: unable to get resource for org/scala-lang#scala-library;2.12.7: res=https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.7/scala-library-2.12.7.pom: java.net.SocketTimeoutException: connect timed out
[error] 
[error] unresolved dependency: org.scala-sbt#sbt;1.2.8: Resolution failed several times for dependency: org.scala-sbt#sbt;1.2.8 {provided=[default(compile)]}:: 
[error]     typesafe-ivy-releases: unable to get resource for org.scala-sbt#sbt;1.2.8: res=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/1.2.8/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[error]     sbt-plugin-releases: unable to get resource for org.scala-sbt#sbt;1.2.8: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-sbt/sbt/1.2.8/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[error]     public: unable to get resource for org/scala-sbt#sbt;1.2.8: res=https://repo1.maven.org/maven2/org/scala-sbt/sbt/1.2.8/sbt-1.2.8.pom: java.net.SocketTimeoutException: connect timed out
[error] 
[error] unresolved dependency: org.scala-lang#scala-compiler;2.12.7: Resolution failed several times for dependency: org.scala-lang#scala-compiler;2.12.7 {scala-tool=[default, optional(default)]}:: 
[error]     typesafe-ivy-releases: unable to get resource for org.scala-lang#scala-compiler;2.12.7: res=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-compiler/2.12.7/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[error]     sbt-plugin-releases: unable to get resource for org.scala-lang#scala-compiler;2.12.7: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-lang/scala-compiler/2.12.7/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[error]     public: unable to get resource for org/scala-lang#scala-compiler;2.12.7: res=https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.12.7/scala-compiler-2.12.7.pom: java.net.SocketTimeoutException: connect timed out
[error] 
[error]     at sbt.internal.librarymanagement.IvyActions$.resolveAndRetrieve(IvyActions.scala:332)
[error]     at sbt.internal.librarymanagement.IvyActions$.$anonfun$updateEither$1(IvyActions.scala:208)
[error]     at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:239)
[error]     at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:204)
[error]     at sbt.internal.librarymanagement.IvySbt.sbt$internal$librarymanagement$IvySbt$$action$1(Ivy.scala:70)
[error]     at sbt.internal.librarymanagement.IvySbt$$anon$3.call(Ivy.scala:77)
[error]     at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:95)
[error]     at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:80)
[error]     at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:99)
[error]     at xsbt.boot.Using$.withResource(Using.scala:10)
[error]     at xsbt.boot.Using$.apply(Using.scala:9)
[error]     at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60)
[error]     at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50)
[error]     at xsbt.boot.Locks$.apply0(Locks.scala:31)
[error]     at xsbt.boot.Locks$.apply(Locks.scala:28)
[error]     at sbt.internal.librarymanagement.IvySbt.withDefaultLogger(Ivy.scala:77)
[error]     at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:199)
[error]     at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:196)
[error]     at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:238)
[error]     at sbt.internal.librarymanagement.IvyActions$.updateEither(IvyActions.scala:193)
[error]     at sbt.librarymanagement.ivy.IvyDependencyResolution.update(IvyDependencyResolution.scala:20)
[error]     at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:56)
[error]     at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:45)
[error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:93)
[error]     at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:68)
[error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$19(LibraryManagement.scala:106)
[error]     at scala.util.control.Exception$Catch.apply(Exception.scala:224)
[error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:106)
[error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:89)
[error]     at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:149)
[error]     at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:120)
[error]     at sbt.Classpaths$.$anonfun$updateTask$5(Defaults.scala:2561)
[error]     at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error]     at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
[error]     at sbt.std.Transform$$anon$4.work(System.scala:67)
[error]     at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
[error]     at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error]     at sbt.Execute.work(Execute.scala:278)
[error]     at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
[error]     at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error]     at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error]     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error]     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error]     at java.lang.Thread.run(Thread.java:748)
[error] (update) sbt.librarymanagement.ResolveException: unresolved dependency: org.scala-lang#scala-library;2.12.7: Resolution failed several times for dependency: org.scala-lang#scala-library;2.12.7 {scala-tool=[default, optional(default)], provided=[default(compile)]}:: 
[error]     typesafe-ivy-releases: unable to get resource for org.scala-lang#scala-library;2.12.7: res=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-library/2.12.7/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[error]     sbt-plugin-releases: unable to get resource for org.scala-lang#scala-library;2.12.7: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-lang/scala-library/2.12.7/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[error]     public: unable to get resource for org/scala-lang#scala-library;2.12.7: res=https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.7/scala-library-2.12.7.pom: java.net.SocketTimeoutException: connect timed out
[error] 
[error] unresolved dependency: org.scala-sbt#sbt;1.2.8: Resolution failed several times for dependency: org.scala-sbt#sbt;1.2.8 {provided=[default(compile)]}:: 
[error]     typesafe-ivy-releases: unable to get resource for org.scala-sbt#sbt;1.2.8: res=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/1.2.8/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[error]     sbt-plugin-releases: unable to get resource for org.scala-sbt#sbt;1.2.8: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-sbt/sbt/1.2.8/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[error]     public: unable to get resource for org/scala-sbt#sbt;1.2.8: res=https://repo1.maven.org/maven2/org/scala-sbt/sbt/1.2.8/sbt-1.2.8.pom: java.net.SocketTimeoutException: connect timed out
[error] 
[error] unresolved dependency: org.scala-lang#scala-compiler;2.12.7: Resolution failed several times for dependency: org.scala-lang#scala-compiler;2.12.7 {scala-tool=[default, optional(default)]}:: 
[error]     typesafe-ivy-releases: unable to get resource for org.scala-lang#scala-compiler;2.12.7: res=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-compiler/2.12.7/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[error]     sbt-plugin-releases: unable to get resource for org.scala-lang#scala-compiler;2.12.7: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-lang/scala-compiler/2.12.7/ivys/ivy.xml: java.net.SocketTimeoutException: connect timed out
[error]     public: unable to get resource for org/scala-lang#scala-compiler;2.12.7: res=https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.12.7/scala-compiler-2.12.7.pom: java.net.SocketTimeoutException: connect timed out
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? %

1 个答案:

答案 0 :(得分:0)

这似乎是代理设置问题。通过在IntelliJ中打开项目,我设法使SBT运行,该项目立即开始下载依赖项。由于我认为IntelliJ能够通过代理进行访问,所以我高度怀疑这是问题所在(即使我也在Ubuntu中配置了它-但显然这不足以满足我的要求)