当我尝试安装scalariform插件时:
build.sbt:
resolvers += Resolver.typesafeRepo("releases")
addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.6.0")
我收到sbt错误:
[
trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.sbt#sbt-scalariform;1.6.0: not found
[error] Total time: 1 s, completed 24-Mar-2016 23:51:57
>
我是否需要特定版本的scalari插件?
答案 0 :(得分:3)
以下项目结构有效。似乎无法从build.sbt添加插件,需要在/project/plugins.sbt中。
/project/plugins.sbt:
addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.6.0")
build.sbt:
scalariformSettings
.scala文件需要在文件夹src / main / scala中才能通过标量格式化