我有一个使用以下内容编译的项目:
sbt.version=0.13.16
build.sbt的内容为:
name := "aName"
version := "1.2"
scalaVersion := "2.11.8"
val sparkVersion = "2.2.0"
libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-core" % sparkVersion,
"org.apache.spark" %% "spark-mllib" % sparkVersion
)
libraryDependencies += "com.typesafe" % "config" % "1.2.1"
resolvers ++= Seq("Akka Repository" at "http://repo.akka.io/releases/")
resolvers ++= Seq("Sonatype Releases" at "https://oss.sonatype.org/content/repositories/releases")
dependencyOverrides ++= Set(
"io.netty" % "netty" % "3.9.9.Final",
"commons-net" % "commons-net" % "2.2",
"com.google.guava" % "guava" % "11.0.2"
)
logLevel := Level.Error // to suppress warning messages when compiling
我认为是时候更新项目以使用最新的sbt版本了,所以我改成了sbt.version=1.1.6
。保存文件后,Intellij IDEA已开始进行一些更改,并且我收到以下消息:
导入sbt项目时出错:
[info] Loading project definition from build.sbt:20: error: No implicit for Append.Values[Seq[sbt.librarymanagement.ModuleID], scala.collection.immutable.Set[sbt.librarymanagement.ModuleID]] found,
so scala.collection.immutable.Set[sbt.librarymanagement.ModuleID] cannot be appended to Seq[sbt.librarymanagement.ModuleID]
dependencyOverrides ++= Set(
^
[error] Type error in expression
Invalid response.
我对此非常迷失。通常,我只运行以下命令:sbt compile
和sbt package
,仅此而已。在我的项目上升级sbt版本的步骤是什么?有什么帮助吗?
答案 0 :(得分:1)
我刚刚删除了以下部分:
dependencyOverrides ++= Set(
"io.netty" % "netty" % "3.9.9.Final",
"commons-net" % "commons-net" % "2.2",
"com.google.guava" % "guava" % "11.0.2"
)
一切顺利!
我希望这对其他人有帮助!