plugins.sbt :
resolvers += Classpaths.typesafeResolver
resolvers += "Sonatype snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/"
resolvers += Resolver.sonatypeRepo("public")
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.5.0-SNAPSHOT")
addSbtPlugin("com.typesafe.startscript" % "xsbt-start-script-plugin" % "0.5.3")
addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.0.0")
addSbtPlugin("org.scalaxb" % "sbt-scalaxb" % "1.1.2")
Build.scala
的部分:
lazy val formatSettings = SbtScalariform.scalariformSettings ++ Seq(
ScalariformKeys.preferences in Compile := formattingPreferences,
ScalariformKeys.preferences in Test := formattingPreferences
)
sbt版本是0.13。错误是“not found: value SbtScalariform
”。这有什么问题?
答案 0 :(得分:2)
改用1.1.0。
addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.1.0")
答案 1 :(得分:1)
这适用于我的Build.scala:
import com.typesafe.sbt.SbtScalariform.scalariformSettings
lazy val proj = Project("app", file("."),
settings = Defaults.defaultSettings ++ scalariformSettings ++ Seq(...))
希望这有助于未来的用户。自述文件导入错误。