2013-09-01 83 views
1

plugins.sbtSBT找不到SbtScalariform

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」。那有什麼問題?

回答

2

改爲使用1.1.0。

addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.1.0")

+0

'[error](*:update)sbt.ResolveException:unresolved dependency:com.typesafe.sbt#sbt-scalariform; 1.1.0:not found' –

1

這個工作對我Build.scala:

import com.typesafe.sbt.SbtScalariform.scalariformSettings 

lazy val proj = Project("app", file("."), 
    settings = Defaults.defaultSettings ++ scalariformSettings ++ Seq(...)) 

希望這有助於未來的用戶。自述文件導入錯誤。

相關問題