哪个版本的 Sbt 和 Sbt 程序集用于 Spack 2.4.5 和 Scala 2.11?
Which version of Sbt and Sbt assembly to use for Spack 2.4.5 and Scala 2.11?
目前,在 AWS EMR 集群中,我使用的是 Scala v2.11
附带的 Spark v2.4.5
。所以在我的项目中,我想使用 Scala v2.11 和相应的 SBT
和 Sbt-Assembly
版本。但是我得到一个或另一个版本与各种博客和 Whosebug 答案上可用的所有排列冲突。
这是我抛出错误的依赖文件:
build.sbt
name := "user-view-services"
version := "0.1"
scalaVersion := "2.11.12"
autoScalaLibrary := false
// Major Libraries version
val sparkVersion = "2.4.5"
val kafkaVersion = "2.5.0"
val akkaVersion = "2.6.4"
val confluentRepo = "confluent-repo" at "https://packages.confluent.io/maven/"
lazy val commonDependencies = Seq(
"junit" % "junit" % "4.13" % Test,
"org.mockito" % "mockito-all" % "1.10.19" % Test,
"com.novocode" % "junit-interface" % "0.11" % Test,
"ch.qos.logback" % "logback-classic" % "1.2.3",
"com.typesafe" % "config" % "1.4.0",
"com.opencsv" % "opencsv" % "5.1",
"org.apache.avro" % "avro" % "1.9.2",
"commons-beanutils" % "commons-beanutils" % "1.9.4",
"commons-beanutils" % "commons-beanutils-bean-collections" % "1.8.3",
"org.drools" % "drools-compiler" % "7.41.0.Final",
"com.typesafe.scala-logging" % "scala-logging_2.11" % "3.5.0"
)
lazy val mongoDBDependencies = Seq(
"org.mongodb" % "mongodb-driver-sync" % "4.0.2"
)
lazy val akkaDependencies = Seq(
"com.typesafe.akka" %% "akka-actor-typed" % akkaVersion
)
lazy val kafkaDependencies = Seq(
"org.apache.kafka" % "kafka-clients" % kafkaVersion,
"org.apache.kafka" % "kafka-streams" % kafkaVersion,
"io.confluent" % "kafka-avro-serializer" % "5.4.1"
)
lazy val sparkDependencies = Seq(
"org.apache.spark" %% "spark-core" % sparkVersion,
"org.apache.spark" %% "spark-sql" % sparkVersion,
"org.apache.spark" %% "spark-streaming" % sparkVersion
)
lazy val rulemodule = (project in file("rule-module"))
.enablePlugins(JavaAppPackaging)
.settings(
name := "rule-module",
version := "1.0",
libraryDependencies ++= commonDependencies
)
/**
* to create uberjar - run command
* 1) sbt "sparkjobs / clean"
* 2) sbt "sparkjobs / assembly"
*/
lazy val sparkjobs = (project in file("user-enrich-batch"))
.dependsOn(rulemodule)
.settings(
name := "user-enrich-batch",
version := "1.0",
resolvers ++= Seq(
confluentRepo
),
libraryDependencies ++= commonDependencies,
libraryDependencies ++= sparkDependencies,
libraryDependencies ++= kafkaDependencies,
dependencyOverrides += "com.fasterxml.jackson.core" % "jackson-databind" % "2.6.7",
assemblyMergeStrategy in assembly := {
case PathList("META-INF", xs @ _*) => MergeStrategy.discard
case x => MergeStrategy.first
},
mainClass in assembly := some("com.analytics.user.etl.ETLProcessor"),
assemblyJarName := "user-view-batch-assembly.jar"
)
lazy val userservice = (project in file("user-enrich-service"))
.dependsOn(rulemodule)
.enablePlugins(JavaAppPackaging)
.settings(
name := "user-enrich-service",
version := "1.0",
resolvers ++= Seq(
confluentRepo
),
libraryDependencies ++= commonDependencies,
libraryDependencies ++= kafkaDependencies,
libraryDependencies ++= akkaDependencies,
libraryDependencies ++= mongoDBDependencies
)
build.properties
sbt.version = 0.13.17
plugins.sbt
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.4")
scalaVersion := "2.11.12"
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.6")
addSbtPlugin("com.cavorite" % "sbt-avro-1-9" % "1.1.7")
assembly.sbt
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.6")
错误:
[info] Loading global plugins from C:\Users\smishra5\.sbt[=14=].13\plugins
[info] Loading project definition from C:\dataanalytics\Recsys\project
[info] Updating {file:/C:/dataanalytics/Recsys/project/}recsys-build...
[info] Resolving com.eed3si9n#sbt-assembly;0.14.6 ...
[warn] module not found: com.eed3si9n#sbt-assembly;0.14.6
[warn] ==== typesafe-ivy-releases: tried
[warn] https://repo.typesafe.com/typesafe/ivy-releases/com.eed3si9n/sbt-assembly/scala_2.11/sbt_0.13/0.14.6/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn] https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.eed3si9n/sbt-assembly/scala_2.11/sbt_0.13/0.14.6/ivys/ivy.xml
[warn] ==== local: tried
[warn] C:\Users\smishra5\.ivy2\local\com.eed3si9n\sbt-assembly\scala_2.11\sbt_0.13[=14=].14.6\ivys\ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/eed3si9n/sbt-assembly_2.11_0.13/0.14.6/sbt-assembly-0.14.6.pom
[warn] ==== local-preloaded-ivy: tried
[warn] C:\Users\smishra5\.sbt\preloaded\com.eed3si9n\sbt-assembly[=14=].14.6\ivys\ivy.xml
[warn] ==== local-preloaded: tried
[warn] file:/C:/Users/smishra5/.sbt/preloaded/com/eed3si9n/sbt-assembly_2.11_0.13/0.14.6/sbt-assembly-0.14.6.pom
[info] Resolving com.typesafe.sbt#sbt-native-packager;1.3.4 ...
[warn] module not found: com.typesafe.sbt#sbt-native-packager;1.3.4
[warn] ==== typesafe-ivy-releases: tried
[warn] https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbt/sbt-native-packager/scala_2.11/sbt_0.13/1.3.4/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn] https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-native-packager/scala_2.11/sbt_0.13/1.3.4/ivys/ivy.xml
[warn] ==== local: tried
[warn] C:\Users\smishra5\.ivy2\local\com.typesafe.sbt\sbt-native-packager\scala_2.11\sbt_0.13.3.4\ivys\ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/typesafe/sbt/sbt-native-packager_2.11_0.13/1.3.4/sbt-native-packager-1.3.4.pom
[warn] ==== local-preloaded-ivy: tried
[warn] C:\Users\smishra5\.sbt\preloaded\com.typesafe.sbt\sbt-native-packager.3.4\ivys\ivy.xml
[warn] ==== local-preloaded: tried
[warn] file:/C:/Users/smishra5/.sbt/preloaded/com/typesafe/sbt/sbt-native-packager_2.11_0.13/1.3.4/sbt-native-packager-1.3.4.pom
[info] Resolving com.cavorite#sbt-avro-1-9;1.1.7 ...
[warn] module not found: com.cavorite#sbt-avro-1-9;1.1.7
[warn] ==== typesafe-ivy-releases: tried
[warn] https://repo.typesafe.com/typesafe/ivy-releases/com.cavorite/sbt-avro-1-9/scala_2.11/sbt_0.13/1.1.7/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn] https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.cavorite/sbt-avro-1-9/scala_2.11/sbt_0.13/1.1.7/ivys/ivy.xml
[warn] ==== local: tried
[warn] C:\Users\smishra5\.ivy2\local\com.cavorite\sbt-avro-1-9\scala_2.11\sbt_0.13.1.7\ivys\ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/cavorite/sbt-avro-1-9_2.11_0.13/1.1.7/sbt-avro-1-9-1.1.7.pom
[warn] ==== local-preloaded-ivy: tried
[warn] C:\Users\smishra5\.sbt\preloaded\com.cavorite\sbt-avro-1-9.1.7\ivys\ivy.xml
[warn] ==== local-preloaded: tried
[warn] file:/C:/Users/smishra5/.sbt/preloaded/com/cavorite/sbt-avro-1-9_2.11_0.13/1.1.7/sbt-avro-1-9-1.1.7.pom
[info] Resolving jline#jline;2.14.3 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.eed3si9n#sbt-assembly;0.14.6: not found
[warn] :: com.typesafe.sbt#sbt-native-packager;1.3.4: not found
[warn] :: com.cavorite#sbt-avro-1-9;1.1.7: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] com.eed3si9n:sbt-assembly:0.14.6 (scalaVersion=2.11, sbtVersion=0.13)
[warn] com.typesafe.sbt:sbt-native-packager:1.3.4 (scalaVersion=2.11, sbtVersion=0.13)
[warn] com.cavorite:sbt-avro-1-9:1.1.7 (scalaVersion=2.11, sbtVersion=0.13)
[warn]
[warn] Note: Unresolved dependencies path:
[warn] com.eed3si9n:sbt-assembly:0.14.6 (scalaVersion=2.11, sbtVersion=0.13) (C:\dataanalytics\Recsys\project\plugins.sbt#L5-6)
[warn] +- default:recsys-build:0.1-SNAPSHOT (scalaVersion=2.11, sbtVersion=0.13)
[warn] com.typesafe.sbt:sbt-native-packager:1.3.4 (scalaVersion=2.11, sbtVersion=0.13) (C:\dataanalytics\Recsys\project\plugins.sbt#L1-2)
[warn] +- default:recsys-build:0.1-SNAPSHOT (scalaVersion=2.11, sbtVersion=0.13)
[warn] com.cavorite:sbt-avro-1-9:1.1.7 (scalaVersion=2.11, sbtVersion=0.13) (C:\dataanalytics\Recsys\project\plugins.sbt#L7-8)
[warn] +- default:recsys-build:0.1-SNAPSHOT (scalaVersion=2.11, sbtVersion=0.13)
sbt.ResolveException: unresolved dependency: com.eed3si9n#sbt-assembly;0.14.6: not found
unresolved dependency: com.typesafe.sbt#sbt-native-packager;1.3.4: not found
unresolved dependency: com.cavorite#sbt-avro-1-9;1.1.7: not found
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:320)
at sbt.IvyActions$$anonfun$updateEither.apply(IvyActions.scala:191)
at sbt.IvyActions$$anonfun$updateEither.apply(IvyActions.scala:168)
at sbt.IvySbt$Module$$anonfun$withModule.apply(Ivy.scala:156)
at sbt.IvySbt$Module$$anonfun$withModule.apply(Ivy.scala:156)
at sbt.IvySbt$$anonfun$withIvy.apply(Ivy.scala:133)
at sbt.IvySbt.sbt$IvySbt$$action(Ivy.scala:57)
at sbt.IvySbt$$anon.call(Ivy.scala:65)
at xsbt.boot.Locks$GlobalLock.withChannel(Locks.scala:95)
at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries(Locks.scala:80)
at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock.apply(Locks.scala:99)
at xsbt.boot.Using$.withResource(Using.scala:10)
at xsbt.boot.Using$.apply(Using.scala:9)
at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60)
at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50)
at xsbt.boot.Locks$.apply0(Locks.scala:31)
at xsbt.boot.Locks$.apply(Locks.scala:28)
at sbt.IvySbt.withDefaultLogger(Ivy.scala:65)
at sbt.IvySbt.withIvy(Ivy.scala:128)
at sbt.IvySbt.withIvy(Ivy.scala:125)
at sbt.IvySbt$Module.withModule(Ivy.scala:156)
at sbt.IvyActions$.updateEither(IvyActions.scala:168)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work.apply(Defaults.scala:1555)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work.apply(Defaults.scala:1551)
at sbt.Classpaths$$anonfun$doWork$$anonfun2.apply(Defaults.scala:1586)
at sbt.Classpaths$$anonfun$doWork$$anonfun2.apply(Defaults.scala:1584)
at sbt.Tracked$$anonfun$lastOutput.apply(Tracked.scala:37)
at sbt.Classpaths$$anonfun$doWork.apply(Defaults.scala:1589)
at sbt.Classpaths$$anonfun$doWork.apply(Defaults.scala:1583)
at sbt.Tracked$$anonfun$inputChanged.apply(Tracked.scala:60)
at sbt.Classpaths$.cachedUpdate(Defaults.scala:1606)
at sbt.Classpaths$$anonfun$updateTask.apply(Defaults.scala:1533)
at sbt.Classpaths$$anonfun$updateTask.apply(Defaults.scala:1485)
at scala.Function1$$anonfun$compose.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon.work(System.scala:63)
at sbt.Execute$$anonfun$submit$$anonfun$apply.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$$anonfun$apply.apply(Execute.scala:228)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:237)
at sbt.Execute$$anonfun$submit.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit.apply(Execute.scala:228)
at sbt.ConcurrentRestrictions$$anon$$anonfun.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
[error] (*:update) sbt.ResolveException: unresolved dependency: com.eed3si9n#sbt-assembly;0.14.6: not found
[error] unresolved dependency: com.typesafe.sbt#sbt-native-packager;1.3.4: not found
[error] unresolved dependency: com.cavorite#sbt-avro-1-9;1.1.7: not found
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? q
您似乎混淆了 SBT 使用的 Scala 版本和您项目中使用的 Scala 版本。
如果您需要使用 Scala 2.11 构建项目,只需在 build.sbt
中指定即可
scalaVersion := "2.11.12"
您必须从 project
文件夹中的 plugins.sbt
中删除 scalaVersion := "2.11.12"
,因为 SBT 是 pre-built 具有特定的 Scala 版本,您无法更改它。例如,0.13.17
使用 Scala 2.10 构建,SBT 1.x.x
使用 Scala 2.12
.
你可以随意使用任何你喜欢的SBT版本,但我建议使用最新的1.3.13
和相应插件的最新版本。
目前,在 AWS EMR 集群中,我使用的是 Scala v2.11
附带的 Spark v2.4.5
。所以在我的项目中,我想使用 Scala v2.11 和相应的 SBT
和 Sbt-Assembly
版本。但是我得到一个或另一个版本与各种博客和 Whosebug 答案上可用的所有排列冲突。
这是我抛出错误的依赖文件:
build.sbt
name := "user-view-services"
version := "0.1"
scalaVersion := "2.11.12"
autoScalaLibrary := false
// Major Libraries version
val sparkVersion = "2.4.5"
val kafkaVersion = "2.5.0"
val akkaVersion = "2.6.4"
val confluentRepo = "confluent-repo" at "https://packages.confluent.io/maven/"
lazy val commonDependencies = Seq(
"junit" % "junit" % "4.13" % Test,
"org.mockito" % "mockito-all" % "1.10.19" % Test,
"com.novocode" % "junit-interface" % "0.11" % Test,
"ch.qos.logback" % "logback-classic" % "1.2.3",
"com.typesafe" % "config" % "1.4.0",
"com.opencsv" % "opencsv" % "5.1",
"org.apache.avro" % "avro" % "1.9.2",
"commons-beanutils" % "commons-beanutils" % "1.9.4",
"commons-beanutils" % "commons-beanutils-bean-collections" % "1.8.3",
"org.drools" % "drools-compiler" % "7.41.0.Final",
"com.typesafe.scala-logging" % "scala-logging_2.11" % "3.5.0"
)
lazy val mongoDBDependencies = Seq(
"org.mongodb" % "mongodb-driver-sync" % "4.0.2"
)
lazy val akkaDependencies = Seq(
"com.typesafe.akka" %% "akka-actor-typed" % akkaVersion
)
lazy val kafkaDependencies = Seq(
"org.apache.kafka" % "kafka-clients" % kafkaVersion,
"org.apache.kafka" % "kafka-streams" % kafkaVersion,
"io.confluent" % "kafka-avro-serializer" % "5.4.1"
)
lazy val sparkDependencies = Seq(
"org.apache.spark" %% "spark-core" % sparkVersion,
"org.apache.spark" %% "spark-sql" % sparkVersion,
"org.apache.spark" %% "spark-streaming" % sparkVersion
)
lazy val rulemodule = (project in file("rule-module"))
.enablePlugins(JavaAppPackaging)
.settings(
name := "rule-module",
version := "1.0",
libraryDependencies ++= commonDependencies
)
/**
* to create uberjar - run command
* 1) sbt "sparkjobs / clean"
* 2) sbt "sparkjobs / assembly"
*/
lazy val sparkjobs = (project in file("user-enrich-batch"))
.dependsOn(rulemodule)
.settings(
name := "user-enrich-batch",
version := "1.0",
resolvers ++= Seq(
confluentRepo
),
libraryDependencies ++= commonDependencies,
libraryDependencies ++= sparkDependencies,
libraryDependencies ++= kafkaDependencies,
dependencyOverrides += "com.fasterxml.jackson.core" % "jackson-databind" % "2.6.7",
assemblyMergeStrategy in assembly := {
case PathList("META-INF", xs @ _*) => MergeStrategy.discard
case x => MergeStrategy.first
},
mainClass in assembly := some("com.analytics.user.etl.ETLProcessor"),
assemblyJarName := "user-view-batch-assembly.jar"
)
lazy val userservice = (project in file("user-enrich-service"))
.dependsOn(rulemodule)
.enablePlugins(JavaAppPackaging)
.settings(
name := "user-enrich-service",
version := "1.0",
resolvers ++= Seq(
confluentRepo
),
libraryDependencies ++= commonDependencies,
libraryDependencies ++= kafkaDependencies,
libraryDependencies ++= akkaDependencies,
libraryDependencies ++= mongoDBDependencies
)
build.properties
sbt.version = 0.13.17
plugins.sbt
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.4")
scalaVersion := "2.11.12"
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.6")
addSbtPlugin("com.cavorite" % "sbt-avro-1-9" % "1.1.7")
assembly.sbt
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.6")
错误:
[info] Loading global plugins from C:\Users\smishra5\.sbt[=14=].13\plugins
[info] Loading project definition from C:\dataanalytics\Recsys\project
[info] Updating {file:/C:/dataanalytics/Recsys/project/}recsys-build...
[info] Resolving com.eed3si9n#sbt-assembly;0.14.6 ...
[warn] module not found: com.eed3si9n#sbt-assembly;0.14.6
[warn] ==== typesafe-ivy-releases: tried
[warn] https://repo.typesafe.com/typesafe/ivy-releases/com.eed3si9n/sbt-assembly/scala_2.11/sbt_0.13/0.14.6/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn] https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.eed3si9n/sbt-assembly/scala_2.11/sbt_0.13/0.14.6/ivys/ivy.xml
[warn] ==== local: tried
[warn] C:\Users\smishra5\.ivy2\local\com.eed3si9n\sbt-assembly\scala_2.11\sbt_0.13[=14=].14.6\ivys\ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/eed3si9n/sbt-assembly_2.11_0.13/0.14.6/sbt-assembly-0.14.6.pom
[warn] ==== local-preloaded-ivy: tried
[warn] C:\Users\smishra5\.sbt\preloaded\com.eed3si9n\sbt-assembly[=14=].14.6\ivys\ivy.xml
[warn] ==== local-preloaded: tried
[warn] file:/C:/Users/smishra5/.sbt/preloaded/com/eed3si9n/sbt-assembly_2.11_0.13/0.14.6/sbt-assembly-0.14.6.pom
[info] Resolving com.typesafe.sbt#sbt-native-packager;1.3.4 ...
[warn] module not found: com.typesafe.sbt#sbt-native-packager;1.3.4
[warn] ==== typesafe-ivy-releases: tried
[warn] https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbt/sbt-native-packager/scala_2.11/sbt_0.13/1.3.4/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn] https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-native-packager/scala_2.11/sbt_0.13/1.3.4/ivys/ivy.xml
[warn] ==== local: tried
[warn] C:\Users\smishra5\.ivy2\local\com.typesafe.sbt\sbt-native-packager\scala_2.11\sbt_0.13.3.4\ivys\ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/typesafe/sbt/sbt-native-packager_2.11_0.13/1.3.4/sbt-native-packager-1.3.4.pom
[warn] ==== local-preloaded-ivy: tried
[warn] C:\Users\smishra5\.sbt\preloaded\com.typesafe.sbt\sbt-native-packager.3.4\ivys\ivy.xml
[warn] ==== local-preloaded: tried
[warn] file:/C:/Users/smishra5/.sbt/preloaded/com/typesafe/sbt/sbt-native-packager_2.11_0.13/1.3.4/sbt-native-packager-1.3.4.pom
[info] Resolving com.cavorite#sbt-avro-1-9;1.1.7 ...
[warn] module not found: com.cavorite#sbt-avro-1-9;1.1.7
[warn] ==== typesafe-ivy-releases: tried
[warn] https://repo.typesafe.com/typesafe/ivy-releases/com.cavorite/sbt-avro-1-9/scala_2.11/sbt_0.13/1.1.7/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn] https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.cavorite/sbt-avro-1-9/scala_2.11/sbt_0.13/1.1.7/ivys/ivy.xml
[warn] ==== local: tried
[warn] C:\Users\smishra5\.ivy2\local\com.cavorite\sbt-avro-1-9\scala_2.11\sbt_0.13.1.7\ivys\ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/cavorite/sbt-avro-1-9_2.11_0.13/1.1.7/sbt-avro-1-9-1.1.7.pom
[warn] ==== local-preloaded-ivy: tried
[warn] C:\Users\smishra5\.sbt\preloaded\com.cavorite\sbt-avro-1-9.1.7\ivys\ivy.xml
[warn] ==== local-preloaded: tried
[warn] file:/C:/Users/smishra5/.sbt/preloaded/com/cavorite/sbt-avro-1-9_2.11_0.13/1.1.7/sbt-avro-1-9-1.1.7.pom
[info] Resolving jline#jline;2.14.3 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.eed3si9n#sbt-assembly;0.14.6: not found
[warn] :: com.typesafe.sbt#sbt-native-packager;1.3.4: not found
[warn] :: com.cavorite#sbt-avro-1-9;1.1.7: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] com.eed3si9n:sbt-assembly:0.14.6 (scalaVersion=2.11, sbtVersion=0.13)
[warn] com.typesafe.sbt:sbt-native-packager:1.3.4 (scalaVersion=2.11, sbtVersion=0.13)
[warn] com.cavorite:sbt-avro-1-9:1.1.7 (scalaVersion=2.11, sbtVersion=0.13)
[warn]
[warn] Note: Unresolved dependencies path:
[warn] com.eed3si9n:sbt-assembly:0.14.6 (scalaVersion=2.11, sbtVersion=0.13) (C:\dataanalytics\Recsys\project\plugins.sbt#L5-6)
[warn] +- default:recsys-build:0.1-SNAPSHOT (scalaVersion=2.11, sbtVersion=0.13)
[warn] com.typesafe.sbt:sbt-native-packager:1.3.4 (scalaVersion=2.11, sbtVersion=0.13) (C:\dataanalytics\Recsys\project\plugins.sbt#L1-2)
[warn] +- default:recsys-build:0.1-SNAPSHOT (scalaVersion=2.11, sbtVersion=0.13)
[warn] com.cavorite:sbt-avro-1-9:1.1.7 (scalaVersion=2.11, sbtVersion=0.13) (C:\dataanalytics\Recsys\project\plugins.sbt#L7-8)
[warn] +- default:recsys-build:0.1-SNAPSHOT (scalaVersion=2.11, sbtVersion=0.13)
sbt.ResolveException: unresolved dependency: com.eed3si9n#sbt-assembly;0.14.6: not found
unresolved dependency: com.typesafe.sbt#sbt-native-packager;1.3.4: not found
unresolved dependency: com.cavorite#sbt-avro-1-9;1.1.7: not found
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:320)
at sbt.IvyActions$$anonfun$updateEither.apply(IvyActions.scala:191)
at sbt.IvyActions$$anonfun$updateEither.apply(IvyActions.scala:168)
at sbt.IvySbt$Module$$anonfun$withModule.apply(Ivy.scala:156)
at sbt.IvySbt$Module$$anonfun$withModule.apply(Ivy.scala:156)
at sbt.IvySbt$$anonfun$withIvy.apply(Ivy.scala:133)
at sbt.IvySbt.sbt$IvySbt$$action(Ivy.scala:57)
at sbt.IvySbt$$anon.call(Ivy.scala:65)
at xsbt.boot.Locks$GlobalLock.withChannel(Locks.scala:95)
at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries(Locks.scala:80)
at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock.apply(Locks.scala:99)
at xsbt.boot.Using$.withResource(Using.scala:10)
at xsbt.boot.Using$.apply(Using.scala:9)
at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60)
at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50)
at xsbt.boot.Locks$.apply0(Locks.scala:31)
at xsbt.boot.Locks$.apply(Locks.scala:28)
at sbt.IvySbt.withDefaultLogger(Ivy.scala:65)
at sbt.IvySbt.withIvy(Ivy.scala:128)
at sbt.IvySbt.withIvy(Ivy.scala:125)
at sbt.IvySbt$Module.withModule(Ivy.scala:156)
at sbt.IvyActions$.updateEither(IvyActions.scala:168)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work.apply(Defaults.scala:1555)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work.apply(Defaults.scala:1551)
at sbt.Classpaths$$anonfun$doWork$$anonfun2.apply(Defaults.scala:1586)
at sbt.Classpaths$$anonfun$doWork$$anonfun2.apply(Defaults.scala:1584)
at sbt.Tracked$$anonfun$lastOutput.apply(Tracked.scala:37)
at sbt.Classpaths$$anonfun$doWork.apply(Defaults.scala:1589)
at sbt.Classpaths$$anonfun$doWork.apply(Defaults.scala:1583)
at sbt.Tracked$$anonfun$inputChanged.apply(Tracked.scala:60)
at sbt.Classpaths$.cachedUpdate(Defaults.scala:1606)
at sbt.Classpaths$$anonfun$updateTask.apply(Defaults.scala:1533)
at sbt.Classpaths$$anonfun$updateTask.apply(Defaults.scala:1485)
at scala.Function1$$anonfun$compose.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon.work(System.scala:63)
at sbt.Execute$$anonfun$submit$$anonfun$apply.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$$anonfun$apply.apply(Execute.scala:228)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:237)
at sbt.Execute$$anonfun$submit.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit.apply(Execute.scala:228)
at sbt.ConcurrentRestrictions$$anon$$anonfun.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
[error] (*:update) sbt.ResolveException: unresolved dependency: com.eed3si9n#sbt-assembly;0.14.6: not found
[error] unresolved dependency: com.typesafe.sbt#sbt-native-packager;1.3.4: not found
[error] unresolved dependency: com.cavorite#sbt-avro-1-9;1.1.7: not found
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? q
您似乎混淆了 SBT 使用的 Scala 版本和您项目中使用的 Scala 版本。
如果您需要使用 Scala 2.11 构建项目,只需在 build.sbt
scalaVersion := "2.11.12"
您必须从 project
文件夹中的 plugins.sbt
中删除 scalaVersion := "2.11.12"
,因为 SBT 是 pre-built 具有特定的 Scala 版本,您无法更改它。例如,0.13.17
使用 Scala 2.10 构建,SBT 1.x.x
使用 Scala 2.12
.
你可以随意使用任何你喜欢的SBT版本,但我建议使用最新的1.3.13
和相应插件的最新版本。