我使用下面的代码继续获得未解析的依赖项。有什么线索我可以做些什么来清除错误?
name := "AkkaDemo"
version := "1.0"
scalaVersion := "2.11.8"
val scalaTestVersion = "3.0.1"
resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"
lazy val akkademoService = project.settings (libraryDependencies ++= Seq(
"mysql" % "mysql-connector-java" % "5.1.25",
"com.typesafe.slick" %% "slick"% "3.1.0",
"com.typesafe.slick" %% "slick-hikaricp" % "3.1.0",
"com.typesafe.akka" %% "akka-actor" % "2.4.16",
"com.typesafe.akka" %% "akka-http" % "10.0.1",
"com.typesafe.akka" % "akka-slf4j" % "2.3.14"
)).
dependsOn(instanceConfig)
lazy val instanceConfig = project
lazy val AkkaDemo = project.in(file(".")).aggregate(instanceConfig, akkademoService)
这是sbt run的sbt输出:
Error:Error while importing SBT project:<br/>...<br/><pre>[info]
Resolving org.fusesource.jansi#jansi;1.4 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.typesafe.akka#akka-actor_2.10;2.4.16: not found
[warn] :: com.typesafe.akka#akka-slf4j;2.3.14: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
答案 0 :(得分:0)
这是通过添加build.sbt和scalaversion来解决的,以用于每个模块。显然,每个模块,没有指定要使用的版本的build.sbt,默认为2.10。