sbt-osgi icon indicating copy to clipboard operation
sbt-osgi copied to clipboard

"Reference to undefined setting" when adding "osgiSettings" to build.sbt

Open sjmarotta opened this issue 9 years ago • 2 comments

I am importing sbt-osgi to my project using the git link in my local project's plugins.sbt file. Here are the contents of my plugins.sbt file:

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")

lazy val plugins = (project in file("."))
  .dependsOn(sbtOsgi)

def sbtOsgi = uri("git://github.com/sbt/sbt-osgi.git")

With that in my build, I can run "sbt compile" and "sbt eclipse" without any trouble. When I add "osgiSettings" with a blank line before it to the end of my build.sbt, I get the following:

Reference to undefined setting:

  *:osgiBundle from compile:packageBin::packagedArtifact (C:\dev\myproject\build.sbt:18)

        at sbt.Init$class.Uninitialized(Settings.scala:270)
        at sbt.Def$.Uninitialized(Def.scala:10)

Is there something wrong with the way that I configured my project, or is this a problem with the plugin?

sjmarotta avatar May 06 '16 18:05 sjmarotta

Have you enabled the SbtOsgi plugin?

eg in your build.sbt file enablePlugins(SbtOsgi)

arashi01 avatar May 18 '16 21:05 arashi01

Thanks @arashi01 worked for me!

nbauernfeind avatar Jun 25 '18 20:06 nbauernfeind