谁能给我一个最小的工作sbt设置为sbt-scalabuff?外面的信息似乎并不完整。我目前正在尝试使用addSbtPlugin("com.github.sbt" % "sbt-scalabuff" % "0.2"),但我使用的是sbt.ResolveException: unresolved dependency: net.sandrogrzicic#scalabuff-runtime_2.9.2;1.3.6: not found。我想我缺少一个存储库。
但是,为什么它使用2.9.2呢?我有scalaVersion := 2.10.3。
build.sbt
organization := "com.confabulous"
name := "protobuf"
version := "0.0.1-SNAPSHOT"
scalaVersion := "2.10.4"
scalacOptions += "-deprecation"
resolvers ++= Seq(
"sonatype releases" at "https://oss.sonatype.org/content/repositories/releas
"sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapsh
"typesafe repo" at "http://repo.typesafe.com/typesafe/releases/"
)
libraryDependencies += "net.sandrogrzicic" %% "scalabuff-runtime" % "1.3.6"plugins/plugins.sbt
addSbtPlugin("com.github.sbt" % "sbt-scalabuff" % "0.2")项目/Build.scala
import sbt._
import scalabuff.ScalaBuffPlugin._
object build extends Build {
lazy val root = Project("main", file("."), settings = Defaults.defaultSetting
}输出
$ sbt compile
Loading /usr/share/sbt/bin/sbt-launch-lib.bash
[info] Loading project definition from /home/dan/projects/confabulous/protobuf/project
[info] Updating {file:/home/dan/projects/confabulous/protobuf/project/}default-6a3ff1...
[info] Resolving org.scala-sbt#precompiled-2_10_1;0.12.4 ...
[info] Done updating.
[info] Set current project to protobuf (in build file:/home/dan/projects/confabulous/protobuf/)
[info] Compiling 1 Scala source to /home/dan/projects/confabulous/protobuf/target/scala-2.10/classes...
[error] /home/dan/projects/confabulous/protobuf/target/scala-2.10/src_managed/scala/com/confabulous/protobuf/ConfabulousProtobuf.scala:11: not found: value net
[error] with net.sandrogrzicic.scalabuff.Message[Pair] {
[error] ^
[error] /home/dan/projects/confabulous/protobuf/target/scala-2.10/src_managed/scala/com/confabulous/protobuf/ConfabulousProtobuf.scala:76: not found: value net
[error] with net.sandrogrzicic.scalabuff.Message[Notice] {
[error] ^发布于 2015-06-12 10:53:20
将https://dl.bintray.com/actor/maven添加到SBT解析器
resolvers ++= Seq("sonatype releases" at "https://oss.sonatype.org/content/repositories/releas
"sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapsh
"typesafe repo" at "http://repo.typesafe.com/typesafe/releases/"
"bintrayRepo" at "https://dl.bintray.com/actor/maven"
)https://stackoverflow.com/questions/23015412
复制相似问题