Scala Play - 一些未解决的依赖项具有额外的属性

Scala Play - Some unresolved dependencies have extra attributes

上下文: 我正在尝试 运行 Scala 的 Play 文档中的入门示例 Web 应用程序:https://www.playframework.com/documentation/2.8.x/HelloWorldTutorial. I confirmed that I have the listed requirements 我已经按照自述文件中的说明似乎表明您在项目目录中 运行 sbt 运行 。我提出了很多错误,这些错误似乎表明我缺少依赖项,但我不知道。

问题:有人可以帮助我解释和解决这些错误吗?谢谢。

C:\Users\eric.barnes\Desktop\play-samples-play-scala-starter-example\play-samples-play-scala-starter-example\project>sbt run
[info] Updated file C:\Users\eric.barnes\Desktop\play-samples-play-scala-starter-example\play-samples-play-scala-starter-example\project\project\build.properties: set sbt.version to 1.5.5
[info] welcome to sbt 1.5.5 (Oracle Corporation Java 16.0.2)
[info] loading global plugins from C:\Users\eric.barnes\.sbt.0\plugins
[info] loading project definition from C:\Users\eric.barnes\Desktop\play-samples-play-scala-starter-example\play-samples-play-scala-starter-example\project\project
[info] loading settings for project project from plugins.sbt ...
[info] set current project to project (in build file:/C:/Users/eric.barnes/Desktop/play-samples-play-scala-starter-example/play-samples-play-scala-starter-example/project/)
[warn]
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]          com.typesafe.sbt:sbt-js-engine:1.2.3 (scalaVersion=2.12, sbtVersion=1.0)
[warn]          com.typesafe.sbt:sbt-native-packager:1.5.2 (scalaVersion=2.12, sbtVersion=1.0)
[warn]          com.lightbend.sbt:sbt-javaagent:0.1.5 (scalaVersion=2.12, sbtVersion=1.0)
[warn]          com.typesafe.sbt:sbt-twirl:1.5.1 (scalaVersion=2.12, sbtVersion=1.0
[warn]          com.typesafe.sbt:sbt-web:1.4.4 (scalaVersion=2.12, sbtVersion=1.0)
[warn]
[warn]  Note: Unresolved dependencies path:
[error] sbt.librarymanagement.ResolveException: Error downloading com.typesafe.sbt:sbt-js-engine;sbtVersion=1.0;scalaVersion=2.12:1.2.3
[error]   Not found
[error]   Not found
[error]   not found: C:\Users\eric.barnes\.ivy2\localcom.typesafe.sbt\sbt-js-engine\scala_2.12\sbt_1.0.2.3\ivys\ivy.xml
[error]   not found: https://repo1.maven.org/maven2/com/typesafe/sbt/sbt-js-engine_2.12_1.0/1.2.3/sbt-js-engine-1.2.3.pom
[error] Error downloading com.typesafe.sbt:sbt-native-packager;sbtVersion=1.0;scalaVersion=2.12:1.5.2
[error]   Not found
[error]   Not found
[error]   not found: C:\Users\eric.barnes\.ivy2\localcom.typesafe.sbt\sbt-native-packager\scala_2.12\sbt_1.0.5.2\ivys\ivy.xml
[error]   not found: https://repo1.maven.org/maven2/com/typesafe/sbt/sbt-native-packager_2.12_1.0/1.5.2/sbt-native-packager-1.5.2.pom
[error] Error downloading com.lightbend.sbt:sbt-javaagent;sbtVersion=1.0;scalaVersion=2.12:0.1.5
[error]   Not found
[error]   Not found
[error]   not found: C:\Users\eric.barnes\.ivy2\localcom.lightbend.sbt\sbt-javaagent\scala_2.12\sbt_1.0[=10=].1.5\ivys\ivy.xml
[error]   not found: https://repo1.maven.org/maven2/com/lightbend/sbt/sbt-javaagent_2.12_1.0/0.1.5/sbt-javaagent-0.1.5.pom
[error] Error downloading com.typesafe.sbt:sbt-twirl;sbtVersion=1.0;scalaVersion=2.12:1.5.1
[error]   Not found
[error]   Not found
[error]   not found: C:\Users\eric.barnes\.ivy2\localcom.typesafe.sbt\sbt-twirl\scala_2.12\sbt_1.0.5.1\ivys\ivy.xml
[error]   not found: https://repo1.maven.org/maven2/com/typesafe/sbt/sbt-twirl_2.12_1.0/1.5.1/sbt-twirl-1.5.1.pom
[error] Error downloading com.typesafe.sbt:sbt-web;sbtVersion=1.0;scalaVersion=2.12:1.4.4
[error]   Not found
[error]   Not found
[error]   not found: C:\Users\eric.barnes\.ivy2\localcom.typesafe.sbt\sbt-web\scala_2.12\sbt_1.0.4.4\ivys\ivy.xml
[error]   not found: https://repo1.maven.org/maven2/com/typesafe/sbt/sbt-web_2.12_1.0/1.4.4/sbt-web-1.4.4.pom
[error]         at lmcoursier.CoursierDependencyResolution.unresolvedWarningOrThrow(CoursierDependencyResolution.scala:258)
[error]         at lmcoursier.CoursierDependencyResolution.$anonfun$update(CoursierDependencyResolution.scala:227)
[error]         at scala.util.Either$LeftProjection.map(Either.scala:573)
[error]         at lmcoursier.CoursierDependencyResolution.update(CoursierDependencyResolution.scala:227)
[error]         at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:60)
[error]         at sbt.internal.LibraryManagement$.resolve(LibraryManagement.scala:59)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate(LibraryManagement.scala:133)
[error]         at sbt.util.Tracked$.$anonfun$lastOutput(Tracked.scala:73)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate(LibraryManagement.scala:146)
[error]         at scala.util.control.Exception$Catch.apply(Exception.scala:228)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate(LibraryManagement.scala:146)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$adapted(LibraryManagement.scala:127)
[error]         at sbt.util.Tracked$.$anonfun$inputChangedW(Tracked.scala:219)
[error]         at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:160)
[error]         at sbt.Classpaths$.$anonfun$updateTask0(Defaults.scala:3678)
[error]         at scala.Function1.$anonfun$compose(Function1.scala:49)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219(TypeFunctions.scala:62)
[error]         at sbt.std.Transform$$anon.work(Transform.scala:68)
[error]         at sbt.Execute.$anonfun$submit(Execute.scala:282)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error]         at sbt.Execute.work(Execute.scala:291)
[error]         at sbt.Execute.$anonfun$submit(Execute.scala:282)
[error]         at sbt.ConcurrentRestrictions$$anon.$anonfun$submitValid(ConcurrentRestrictions.scala:265)
[error]         at sbt.CompletionService$$anon.call(CompletionService.scala:64)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
[error]         at java.base/java.lang.Thread.run(Thread.java:831)
[error] (update) sbt.librarymanagement.ResolveException: Error downloading com.typesafe.sbt:sbt-js-engine;sbtVersion=1.0;scalaVersion=2.12:1.2.3
[error]   Not found
[error]   Not found
[error]   not found: C:\Users\eric.barnes\.ivy2\localcom.typesafe.sbt\sbt-js-engine\scala_2.12\sbt_1.0.2.3\ivys\ivy.xml
[error]   not found: https://repo1.maven.org/maven2/com/typesafe/sbt/sbt-js-engine_2.12_1.0/1.2.3/sbt-js-engine-1.2.3.pom
[error] Error downloading com.typesafe.sbt:sbt-native-packager;sbtVersion=1.0;scalaVersion=2.12:1.5.2
[error]   Not found
[error]   Not found
[error]   not found: C:\Users\eric.barnes\.ivy2\localcom.typesafe.sbt\sbt-native-packager\scala_2.12\sbt_1.0.5.2\ivys\ivy.xml
[error]   not found: https://repo1.maven.org/maven2/com/typesafe/sbt/sbt-native-packager_2.12_1.0/1.5.2/sbt-native-packager-1.5.2.pom
[error] Error downloading com.lightbend.sbt:sbt-javaagent;sbtVersion=1.0;scalaVersion=2.12:0.1.5
[error]   Not found
[error]   Not found
[error]   not found: C:\Users\eric.barnes\.ivy2\localcom.lightbend.sbt\sbt-javaagent\scala_2.12\sbt_1.0[=10=].1.5\ivys\ivy.xml
[error]   not found: https://repo1.maven.org/maven2/com/lightbend/sbt/sbt-javaagent_2.12_1.0/0.1.5/sbt-javaagent-0.1.5.pom
[error] Error downloading com.typesafe.sbt:sbt-twirl;sbtVersion=1.0;scalaVersion=2.12:1.5.1
[error]   Not found
[error]   Not found
[error]   not found: C:\Users\eric.barnes\.ivy2\localcom.typesafe.sbt\sbt-twirl\scala_2.12\sbt_1.0.5.1\ivys\ivy.xml
[error]   not found: https://repo1.maven.org/maven2/com/typesafe/sbt/sbt-twirl_2.12_1.0/1.5.1/sbt-twirl-1.5.1.pom
[error] Error downloading com.typesafe.sbt:sbt-web;sbtVersion=1.0;scalaVersion=2.12:1.4.4
[error]   Not found
[error]   Not found
[error]   not found: C:\Users\eric.barnes\.ivy2\localcom.typesafe.sbt\sbt-web\scala_2.12\sbt_1.0.4.4\ivys\ivy.xml
[error]   not found: https://repo1.maven.org/maven2/com/typesafe/sbt/sbt-web_2.12_1.0/1.4.4/sbt-web-1.4.4.pom
[error] Total time: 0 s, completed Oct 4, 2021, 12:16:17 PM

C:\Users\eric.barnes\Desktop\play-samples-play-scala-starter- 
example\play-samples-play-scala-starter-example\project>

您需要在父目录中 运行 sbt,而不是在 project 目录中,即在 C:\...\play-samples-play-scala-starter-example\.

为了提供更多上下文,SBT 是一个递归构建工具,project 目录包含用于构建主项目的元数据,但它不是直接构建的目的。