导入SBT项目时出错

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了导入SBT项目时出错相关的知识,希望对你有一定的参考价值。

以下是我在构建SBT项目时可以看到的日志。以下是试图说明的内容!

我正在使用IntelliJ IDE和Scala 2.12以及SBT 1.0.3来构建项目。我已经验证了IDE代理设置,它的设置并适用于其他Build工具。是不是缺少我的SBT安装?我尝试访问日志中的失败链接,他们也遇到了错误。

  "C:Program FilesJavajdk1.8.0_131injava" -agentlib:jdwp=transport=dt_socket,address=12805,suspend=n,server=y -server -Xmx768M -XX:MaxPermSize=384M -Dhttp.proxyHost=THISISMYPROXYADDRESS -Dhttp.proxyPort=8090 -Didea.runid=2017.2 -Dfile.encoding=windows-1252 -classpath "C:Program FilesJetBrainsIntelliJ IDEA Community Edition 2017.2.5libidea_rt.jar" -jar C:UsersUSER.IdeaIC2017.2configpluginsScalalaunchersbt-launch.jar idea-shell
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=384M; sup
port was removed in 8.0
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
Listening for transport dt_socket at address: 12805
[info] Loading settings from idea.sbt ...
[info] Loading global plugins from C:UsersUSER.sbt1.0plugins
[info] Updating {file:/C:/Users/USER/.sbt/1.0/plugins/}global-plugins...
[warn]  [FAILED     ] org.apache.logging.log4j#log4j-core;2.8.1!log4j-core.jar(test-jar): typesafe-ivy-releases: unable to get resource for org.apache.logging.log4j#log4j-core;2.8.1: res=https://repo.typesafe.com/typesafe/ivy-releases/org.apache.logging.log4j/log4j-core/2.8.1/test-jars/log4j-core-tests.jar: java.net.ConnectException: Failed to connect to repo.typesafe.com/34.206.162.65:443 (4182ms)
[warn]  [FAILED     ] org.apache.logging.log4j#log4j-core;2.8.1!log4j-core.jar(test-jar): sbt-plugin-releases: unable to get resource for org.apache.logging.log4j#log4j-core;2.8.1: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.apache.logging.log4j/log4j-core/2.8.1/test-jars/log4j-core-tests.jar: java.net.ConnectException: Failed to connect to repo.scala-sbt.org/52.201.87.92:443 (4115ms)
[warn]  [FAILED     ] org.apache.logging.log4j#log4j-core;2.8.1!log4j-core.jar(test-jar): public: unable to get resource for org/apache/logging/log4j#log4j-core;2.8.1: res=https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.8.1/log4j-core-2.8.1-tests.jar: java.net.ConnectException: Failed to connect to repo1.maven.org/151.101.16.209:443 (1036ms)
[warn]  Detected merged artifact: [FAILED     ] org.apache.logging.log4j#log4j-core;2.8.1!log4j-core.jar(test-jar):  (0ms).
[warn] ==== typesafe-ivy-releases: tried
[warn] ==== sbt-plugin-releases: tried
[warn]   https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.apache.logging.log4j/log4j-core/2.8.1/test-jars/log4j-core-tests.jar
[warn] ==== local: tried
[warn]   C:UsersUSER.ivy2localorg.apache.logging.log4jlog4j-core2.8.1	est-jarslog4j-core-tests.jar
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.8.1/log4j-core-2.8.1-tests.jar
[warn] ==== local-preloaded-ivy: tried
[warn]   C:UsersUSER.sbtpreloadedorg.apache.logging.log4jlog4j-core2.8.1	est-jarslog4j-core-tests.jar
[warn] ==== local-preloaded: tried
[warn]   file:/C:/Users/USER/.sbt/preloaded/org/apache/logging/log4j/log4j-core/2.8.1/log4j-core-2.8.1-tests.jar
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.jetbrains#sbt-structure-extractor;2017.2: Resolution failed several times for dependency: org.jetbrains#sbt-structure-extractor;2017.2 {compile=[default(compile)]}::
[warn]  typesafe-ivy-releases: unable to get resource for org.jetbrains#sbt-structure-extractor;2017.2: res=https://repo.typesafe.com/typesafe/ivy-releases/org.jetbrains/sbt-structure-extractor/scala_2.12/sbt_1.0/2017.2/ivys/ivy.xml: java.net.ConnectException: Failed to connect to repo.typesafe.com/34.206.162.65:443
[warn]  sbt-plugin-releases: unable to get resource for org.jetbrains#sbt-structure-extractor;2017.2: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.jetbrains/sbt-structure-extractor/scala_2.12/sbt_1.0/2017.2/ivys/ivy.xml: java.net.ConnectException: Failed to connect to repo.scala-sbt.org/52.201.87.92:443
[warn]  public: unable to get resource for org/jetbrains#sbt-structure-extractor;2017.2: res=https://repo1.maven.org/maven2/org/jetbrains/sbt-structure-extractor_2.12_1.0/2017.2/sbt-structure-extractor-2017.2.pom: java.net.ConnectException: Failed to connect to repo1.maven.org/151.101.16.209:443
[warn]  :: org.jetbrains#sbt-idea-shell;2017.2: Resolution failed several times for dependency: org.jetbrains#sbt-idea-shell;2017.2 {compile=[default(compile)]}::
[warn]  typesafe-ivy-releases: unable to get resource for org.jetbrains#sbt-idea-shell;2017.2: res=https://repo.typesafe.com/typesafe/ivy-releases/org.jetbrains/sbt-idea-shell/scala_2.12/sbt_1.0/2017.2/ivys/ivy.xml: java.net.ConnectException: Failed to connect to repo.typesafe.com/34.206.162.65:443
[warn]  sbt-plugin-releases: unable to get resource for org.jetbrains#sbt-idea-shell;2017.2: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.jetbrains/sbt-idea-shell/scala_2.12/sbt_1.0/2017.2/ivys/ivy.xml: java.net.ConnectException: Failed to connect to repo.scala-sbt.org/52.201.87.92:443
[warn]  public: unable to get resource for org/jetbrains#sbt-idea-shell;2017.2: res=https://repo1.maven.org/maven2/org/jetbrains/sbt-idea-shell_2.12_1.0/2017.2/sbt-idea-shell-2017.2.pom: java.net.ConnectException: Failed to connect to repo1.maven.org/151.101.16.209:443
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::              FAILED DOWNLOADS            ::
[warn]  :: ^ see resolution messages for details  ^ ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.apache.logging.log4j#log4j-core;2.8.1!log4j-core.jar(test-jar)
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]          org.jetbrains:sbt-structure-extractor:2017.2 (scalaVersion=2.12, sbtVersion=1.0)
[warn]          org.jetbrains:sbt-idea-shell:2017.2 (scalaVersion=2.12, sbtVersion=1.0)
[warn]
[warn]  Note: Unresolved dependencies path:
[warn]          org.jetbrains:sbt-structure-extractor:2017.2 (scalaVersion=2.12, sbtVersion=1.0) (C:UsersUSER.sbt1.0pluginsidea.sbt#L4-8)
[warn]            +- org.scala-sbt:global-plugins:0.0 (scalaVersion=2.12, sbtVersion=1.0)
[warn]          org.jetbrains:sbt-idea-shell:2017.2 (scalaVersion=2.12, sbtVersion=1.0) (C:UsersUSER.sbt1.0pluginsidea.sbt#L4-8)
[warn]            +- org.scala-sbt:global-plugins:0.0 (scalaVersion=2.12, sbtVersion=1.0)
[error] sbt.librarymanagement.ResolveException: unresolved dependency: org.jetbrains#sbt-structure-extractor;2017.2: Resolution failed several times for dependency: org.jetbrains#sbt-structure-extractor;2017.2 {compile=[default(compile)]}::
[error]         typesafe-ivy-releases: unable to get resource for org.jetbrains#sbt-structure-extractor;2017.2: res=https://repo.typesafe.com/typesafe/ivy-releases/org.jetbrains/sbt-structure-extractor/scala_2.12/sbt_1.0/2017.2/ivys/ivy.xml: java.net.ConnectException: Failed to connect to repo.typesafe.com/34.206.162.65:443
[error]         sbt-plugin-releases: unable to get resource for org.jetbrains#sbt-structure-extractor;2017.2: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.jetbrains/sbt-structure-extractor/scala_2.12/sbt_1.0/2017.2/ivys/ivy.xml: java.net.ConnectException: Failed to connect to repo.scala-sbt.org/52.201.87.92:443
[error]         public: unable to get resource for org/jetbrains#sbt-structure-extractor;2017.2: res=https://repo1.maven.org/maven2/org/jetbrains/sbt-structure-extractor_2.12_1.0/2017.2/sbt-structure-extractor-2017.2.pom: java.net.ConnectException: Failed to connect to repo1.maven.org/151.101.16.209:443
[error]
[error] unresolved dependency: org.jetbrains#sbt-idea-shell;2017.2: Resolution failed several times for dependency: org.jetbrains#sbt-idea-shell;2017.2 {compile=[default(compile)]}::
[error]         typesafe-ivy-releases: unable to get resource for org.jetbrains#sbt-idea-shell;2017.2: res=https://repo.typesafe.com/typesafe/ivy-releases/org.jetbrains/sbt-idea-shell/scala_2.12/sbt_1.0/2017.2/ivys/ivy.xml: java.net.ConnectException: Failed to connect to repo.typesafe.com/34.206.162.65:443
[error]         sbt-plugin-releases: unable to get resource for org.jetbrains#sbt-idea-shell;2017.2: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.jetbrains/sbt-idea-shell/scala_2.12/sbt_1.0/2017.2/ivys/ivy.xml: java.net.ConnectException: Failed to connect to repo.scala-sbt.org/52.201.87.92:443
[error]         public: unable to get resource for org/jetbrains#sbt-idea-shell;2017.2: res=https://repo1.maven.org/maven2/org/jetbrains/sbt-idea-shell_2.12_1.0/2017.2/sbt-idea-shell-2017.2.pom: java.net.ConnectException: Failed to connect to repo1.maven.org/151.101.16.209:443
[error]
[error] download failed: org.apache.logging.log4j#log4j-core;2.8.1!log4j-core.jar(test-jar)
[error]         at sbt.internal.librarymanagement.IvyActions$.resolveAndRetrieve(IvyActions.scala:331)
[error]         at sbt.internal.librarymanagement.IvyActions$.$anonfun$updateEither$1(IvyActions.scala:205)
[error]         at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:229)
[error]         at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:190)
[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:93)
[error]         at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
[error]         at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
[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:58)
[error]         at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
[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:185)
[error]         at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:182)
[error]         at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:228)
[error]         at sbt.internal.librarymanagement.IvyActions$.updateEither(IvyActions.scala:190)
[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:38)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:91)
[error]         at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:68)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$19(LibraryManagement.scala:104)
[error]         at scala.util.control.Exception$Catch.apply(Exception.scala:224)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:104)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:87)
[error]         at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:149)
[error]         at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:118)
[error]         at sbt.Classpaths$.$anonfun$updateTask$5(Defaults.scala:2353)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:42)
[error]         at sbt.std.Transform$$anon$4.work(System.scala:64)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:257)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error]         at sbt.Execute.work(Execute.scala:266)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:257)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:167)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:32)
[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:1142)
[error]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[error]         at java.lang.Thread.run(Thread.java:748)
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? [error] (*:update) sbt.librarymanagement.ResolveException: unresolved dependency: org.jetbrains#sbt-structure-extractor;2017.2: Resolution failed several times for dependency: org.jetbrains#sbt-structure-extractor;2017.2 {compile=[default(compile)]}::
[error]         typesafe-ivy-releases: unable to get resource for org.jetbrains#sbt-structure-extractor;2017.2: res=https://repo.typesafe.com/typesafe/ivy-releases/org.jetbrains/sbt-structure-extractor/scala_2.12/sbt_1.0/2017.2/ivys/ivy.xml: java.net.ConnectException: Failed to connect to repo.typesafe.com/34.206.162.65:443
[error]         sbt-plugin-releases: unable to get resource for org.jetbrains#sbt-structure-extractor;2017.2: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.jetbrains/sbt-structure-extractor/scala_2.12/sbt_1.0/2017.2/ivys/ivy.xml: java.net.ConnectException: Failed to connect to repo.scala-sbt.org/52.201.87.92:443
[error]         public: unable to get resource for org/jetbrains#sbt-structure-extractor;2017.2: res=https://repo1.maven.org/maven2/org/jetbrains/sbt-structure-extractor_2.12_1.0/2017.2/sbt-structure-extractor-2017.2.pom: java.net.ConnectException: Failed to connect to repo1.maven.org/151.101.16.209:443
[error]
[error] unresolved dependency: org.jetbrains#sbt-idea-shell;2017.2: Resolution failed several times for dependency: org.jetbrains#sbt-idea-shell;2017.2 {compile=[default(compile)]}::
[error]         typesafe-ivy-releases: unable to get resource for org.jetbrains#sbt-idea-shell;2017.2: res=https://repo.typesafe.com/typesafe/ivy-releases/org.jetbrains/sbt-idea-shell/scala_2.12/sbt_1.0/2017.2/ivys/ivy.xml: java.net.ConnectException: Failed to connect to repo.typesafe.com/34.206.162.65:443
[error]         sbt-plugin-releases: unable to get resource for org.jetbrains#sbt-idea-shell;2017.2: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.jetbrains/sbt-idea-shell/scala_2.12/sbt_1.0/2017.2/ivys/ivy.xml: java.net.ConnectException: Failed to connect to repo.scala-sbt.org/52.201.87.92:443
[error]         public: unable to get resource for org/jetbrains#sbt-idea-shell;2017.2: res=https://repo1.maven.org/maven2/org/jetbrains/sbt-idea-shell_2.12_1.0/2017.2/sbt-idea-shell-2017.2.pom: java.net.ConnectException: Failed to connect to repo1.maven.org/151.101.16.209:443
[error]
[error] download failed: org.apache.logging.log4j#log4j-core;2.8.1!log4j-core.jar(test-jar)

更新:以下是文件内容

build.sbt

name:=“untitled3”

版本:=“0.1”

scalaVersion:=“2.12.4”

更新 - JAVA_OPTS设置

SET“JAVA_OPTS = -Dhttp.proxyHost = sproxy.wwcorp.ad.com -Dhttp.proxyPort = 8090 -Dhttps.proxyHost = sproxy.wwcorp.ad.com -Dhttps.proxyPort = 8090”

更新 - 新错误日志

[info] Loading settings from idea.sbt ...
[info] Loading global plugins from C:UsersUSER.sbt1.0plugins
[info] Updating {file:/C:/Users/USER/.sbt/1.0/plugins/}global-plugins...
[warn]  [FAILED     ] org.apache.logging.log4j#log4j-core;2.8.1!log4j-core.jar(test-jar): typesafe-ivy-releases: unable to get resource for org.apache.logging.log4j#log4j-core;2.8.1: res=https://repo.typesafe.com/typesafe/ivy-releases/org.apache.logging.log4j/log4j-core/2.8.1/test-jars/log4j-core-tests.jar: java.net.ConnectException: Failed to connect to repo.typesafe.com/52.201.87.92:443 (5372ms)
[warn]  [FAILED     ] org.apache.logging.log4j#log4j-core;2.8.1!log4j-core.jar(test-jar): sbt-plugin-releases: unable to get resource for org.apache.logging.log4j#log4j-core;2.8.1: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.apache.logging.log4j/log4j-core/2.8.1/test-jars/log4j-core-tests.jar: java.net.ConnectException: Failed to connect to repo.scala-sbt.org/34.206.162.65:443 (4118ms)
[warn]  [FAILED     ] org.apache.logging.log4j#log4j-core;2.8.1!log4j-core.jar(test-jar): public: unable to get resource for org/apache/logging/log4j#log4j-core;2.8.1: res=https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.8.1/log4j-core-2.8.1-tests.jar: java.net.ConnectException: Failed to connect to repo1.maven.org/151.101.16.209:443 (1071ms)
[warn]  Detected merged artifact: [FAILED     ] org.apache.logging.log4j#log4j-core;2.8.1!log4j-core.jar(test-jar):  (0ms).
[warn] ==== typesafe-ivy-releases: tried
[warn] ==== sbt-plugin-releases: tried
[warn]   https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.apache.logging.log4j/log4j-core/2.8.1/test-jars/log4j-core-tests.jar
[warn] ==== local: tried
[warn]   C:UsersUSER.ivy2localorg.apache.logging.log4jlog4j-core2.8.1	est-jarslog4j-core-tests.jar
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.8.1/log4j-core-2.8.1-tests.jar
[warn] ==== local-preloaded-ivy: tried
[warn]   C:UsersUSER.sbtpreloadedorg.apache.logging.log4jlog4j-core2.8.1	est-jarslog4j-core-tests.jar
[warn] ==== local-preloaded: tried
[warn]   file:/C:/Users/USER/.sbt/preloaded/org/apache/logging/log4j/log4j-core/2.8.1/log4j-core-2.8.1-tests.jar
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::              FAILED DOWNLOADS            ::
[warn]  :: ^ see resolution messages for details  ^ ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.apache.logging.log4j#log4j-core;2.8.1!log4j-core.jar(test-jar)
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[error] sbt.librarymanagement.ResolveException: download failed: org.apache.logging.log4j#log4j-core;2.8.1!log4j-core.jar(test-jar)
[error]     at sbt.internal.librarymanagement.IvyActions$.resolveAndRetrieve(IvyActions.scala:331)
[error]     at sbt.internal.librarymanagement.IvyActions$.$anonfun$updateEither$1(IvyActions.scala:205)
[error]     at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:229)
[error]     at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:190)
[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:93)
[error]     at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
[error]     at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
[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:58)
[error]     at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
[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:185)
[error]     at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:182)
[error]     at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:228)
[error]     at sbt.internal.librarymanagement.IvyActions$.updateEither(IvyActions.scala:190)
[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:38)
[error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:91)
[error]     at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:68)
[error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$19(LibraryManagement.scala:104)
[error]     at scala.util.control.Exception$Catch.apply(Exception.scala:224)
[error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:104)
[error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:87)
[error]     at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:149)
[error]     at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:118)
[error]     at sbt.Classpaths$.$anonfun$updateTask$5(Defaults.scala:2353)
[error]     at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error]     at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:42)
[error]     at sbt.std.Transform$$anon$4.work(System.scala:64)
[error]     at sbt.Execute.$anonfun$submit$2(Execute.scala:257)
[error]     at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error]     at sbt.Execute.work(Execute.scala:266)
[error]     at sbt.Execute.$anonfun$submit$1(Execute.scala:257)
[error]     at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:167)
[error]     at sbt.CompletionService$$anon$2.call(CompletionService.scala:32)
[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:1142)
[error]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[error]     at java.lang.Thread.run(Thread.java:748)
[error] (*:update) sbt.librarymanagement.ResolveException: download failed: org.apache.logging.log4j#log4j-core;2.8.1!log4j-core.jar(test-jar)
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=384M; support was removed in 8.0
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true

更新SBT

name:=“untitled3”

版本:=“0.1”

scalaVersion:=“2.12.4”

excludeDependencies + =“org.apache.logging.log4j”

答案

似乎在SBT的发布缓存中已经消失了几件事,它们在过去几天内需要0.13.x和1.x.x的SBT。仍在寻找答案,我为Maven 2添加了一个解析器应该找到的东西(可以从Maven 2下载......)但它忽略了这个东西

就像我在Autotools一样,我很快就被深深地打动了(这是一件非常非常糟糕的事情......)。无论如何,工具应该只是它们需要的复杂而且在使用时要适度直接。它们应该是自成一体的,而不是像一些似乎不会做的那样,无缘无故地拉出一堆东西。

我会进一步挖掘自己,看看我是否能以某种方式解决它并相应地更新答案。

另一答案

就我而言,这与任何代理无关。我在project / build.properties中指定了sbt.version = 1.0.3,并且我安装了sbt版本1.1.1。失败模式令人费解。

以上是关于导入SBT项目时出错的主要内容,如果未能解决你的问题,请参考以下文章

导入 sbt 项目时出错:idea

尝试使用 sbt 导入 spark 时出错

Intellij 无法导入 SBT 项目

尝试使用 sbt 导入 dbcp2 和 postgres 库时出错 [重复]

使用scalatest,sbt目录结构时出错

在 sbt 项目中导入烫伤时出错