Home > Software design >  Scala Play - Some unresolved dependencies have extra attributes
Scala Play - Some unresolved dependencies have extra attributes

Time:10-07

Context: I'm trying to run the starter sample web application in the Play documentation for Scala: https://www.playframework.com/documentation/2.8.x/HelloWorldTutorial. I confirmed that I have the listed requirements and I've followed the instructions in the README which appear to state you run sbt run in the project directory. I'm raising a ton of errors which seem to indicate I have missing dependencies but I have no idea.

Questions: Can someone please assist in helping me interpret and resolve these errors? Thank you.

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\1.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\1.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\1.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\0.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\1.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\1.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$38(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$1(LibraryManagement.scala:59)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:133)
[error]         at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:73)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$20(LibraryManagement.scala:146)
[error]         at scala.util.control.Exception$Catch.apply(Exception.scala:228)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:146)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:127)
[error]         at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:219)
[error]         at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:160)
[error]         at sbt.Classpaths$.$anonfun$updateTask0$1(Defaults.scala:3678)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error]         at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error]         at sbt.Execute.$anonfun$submit$2(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$1(Execute.scala:282)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error]         at sbt.CompletionService$$anon$2.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\1.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\1.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\0.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\1.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\1.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>

CodePudding user response:

You need to run sbt in the parent directory, not in the project directory, i.e. in C:\...\play-samples-play-scala-starter-example\.

To give more context, SBT is a recursive build tool and the project directory contains metadata to build the main project but it's not aimed to be built directly.

  • Related