I tried to use the sbt-osgi plugin, but I can't load its AutoPlugin
, the compiler refuses to compile my code.
First, I added the newest version of the plugin to project/plugins.sbt
:
resolvers += Classpaths.sbtPluginSnapshots
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.8.0-SNAPSHOT")
After that, I set the sbt version in project/build.properties
:
sbt.version=0.13.7
Then, I created project/Build.scala
with the following contents:
import sbt._
import com.typesafe.sbt.osgi.SbtOsgi
object Build extends sbt.Build {
lazy val fooProject = Project("foo-project", file("."))
.enablePlugins(SbtOsgi)
}
But this results in the following error message:
[info] Loading project definition from .../sbt-osgi-test/project
[info] Compiling 1 Scala source to .../sbt-osgi-test/project/target/scala-2.10/sbt-0.13/classes...
[error] .../sbt-osgi-test/project/Build.scala:10: type mismatch;
[error] found : com.typesafe.sbt.osgi.SbtOsgi.type
[error] required: sbt.Plugins
[error] .enablePlugins(SbtOsgi)
[error] ^
[error] one error found
[error] (compile:compile) Compilation failed
This error message doesn't make any sense, because AutoPlugin
extends sbt.Plugins
. What could be the problem?