When I try to sbt build my project, the project build fails with an "extracting product structure failed" error. I am suspecting something related to the versions I am using for Alpakka and Akka.
Here is my build.sbt file:
lazy val akkaHttpVersion = "10.2.4" // "10.1.11"
lazy val akkaVersion = "2.6.14" // "2.5.31"
val JacksonVersion = "2.10.5.1"
lazy val root = (project in file(".")).
settings(
inThisBuild(List(
organization := "com.example",
scalaVersion := "2.13.4"//"2.12.11"
)),
name := "XYZ",
libraryDependencies ++= Seq(
"org.orekit" % "orekit" % "10.3",
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
"com.typesafe.akka" %% "akka-http-spray-json" % akkaHttpVersion,
"com.typesafe.akka" %% "akka-actor-typed" % akkaVersion,
"com.typesafe.akka" %% "akka-stream" % akkaVersion,
"ch.qos.logback" % "logback-classic" % "1.2.3",
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % Test,
"com.typesafe.akka" %% "akka-actor-testkit-typed" % akkaVersion % Test,
"org.scalatest" %% "scalatest" % "3.1.4" % Test,
"org.ehcache" % "ehcache" % "3.1.3",
"org.apache.httpcomponents" % "httpclient" % "4.5.13",
"org.scala-lang.modules" %% "scala-parallel-collections" % "0.2.0",
"org.apache.sling" % "sling-maven-plugin" % "2.4.2",
"com.fasterxml.jackson.module" % "jackson-module-scala" % "2.0.2",
"com.fasterxml.jackson.core" % "jackson-databind" % JacksonVersion,
"com.typesafe.akka" %% "akka-stream-kafka" % "2.0.7",
"com.lightbend.akka" %% "akka-stream-alpakka-reference" % "2.0.2"
)
)
When I remove the alpakka dependency at the end of the library, the error goes away but I am unable to to build project because of the missing alpakka dependency.
Ultimately, I am just trying to implement this: https://akka.io/alpakka-samples/http-csv-to-kafka/step4.html
Gael: Here is the image of the error message from Intellij
When running sbt clean compile
, I get the following error stack:
[warn]
[warn] Note: Unresolved dependencies path:
[error] sbt.librarymanagement.ResolveException: Error downloading com.lightbend.akka:akka-stream-alpakka-reference_2.13:2.0.2
[error] Not found
[error] Not found
[error] not found: C:\Users\ihussein\.ivy2\localcom.lightbend.akka\akka-stream-alpakka-reference_2.13\2.0.2\ivys\ivy.xml
[error] not found: https://repo1.maven.org/maven2/com/lightbend/akka/akka-stream-alpakka-reference_2.13/2.0.2/akka-stream-alpakka-reference_2.13-2.0.2.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:53)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:103)
[error] at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:73)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$20(LibraryManagement.scala:116)
[error] at scala.util.control.Exception$Catch.apply(Exception.scala:228)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:116)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:97)
[error] at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:219)
[error] at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:130)
[error] at sbt.Classpaths$.$anonfun$updateTask0$5(Defaults.scala:3486)
[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.util.concurrent.FutureTask.run(Unknown Source)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
[error] at java.util.concurrent.FutureTask.run(Unknown Source)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[error] at java.lang.Thread.run(Unknown Source)
[error] (update) sbt.librarymanagement.ResolveException: Error downloading com.lightbend.akka:akka-stream-alpakka-reference_2.13:2.0.2
[error] Not found
[error] Not found
[error] not found: C:\Users\ihussein\.ivy2\localcom.lightbend.akka\akka-stream-alpakka-reference_2.13\2.0.2\ivys\ivy.xml
[error] not found: https://repo1.maven.org/maven2/com/lightbend/akka/akka-stream-alpakka-reference_2.13/2.0.2/akka-stream-alpakka-reference_2.13-2.0.2.pom
It seems that I needed to use "com.lightbend.akka" %% "akka-stream-alpakka-csv" % "2.0.2"
instead of "com.lightbend.akka" %% "akka-stream-alpakka-reference" % "2.0.2"
.