Skip to content

SbtIntegrationInNetBeans

dcaoyuan edited this page Feb 14, 2013 · 18 revisions

#SBT Integration in NetBeans

##Only Scala-2.10+ is supported under NetBeans

  • That is, always try to set your project's Scala version to 2.10+ in Build.scala or build.sbt:

    scalaVersion := "2.10.0"

##Supported features

  • Recognize sbt project and open in NetBeans
  • Open sbt console in NetBeans (Right click on sbt project, choose "Open Sbt")
  • Jump to/Open compile error lines

##How to

  • With newest nbscala plugins installed on NetBeans 7.2+.

  • Git clone, build above sbt plugin and publish-local:

    git clone [email protected]:dcaoyuan/nbsbt.git

    cd nbsbt

    sbt compile publish-local

  • Add nbsbt to your plugin definition file. You can use either the global one at ~/.sbt/plugins/plugins.sbt or the project-specific one at PROJECT_DIR/project/plugins.sbt

    addSbtPlugin("org.netbeans.sbt" % "sbt-plugin" % "1.0.0")

##FAQ

Q: I got:

`[error] sbt.IncompatiblePluginsException: Binary incompatibility in plugins detected.`

A: Try to remove published nbsbt plugin from your local .ivy2 repository:

rm -r ~/.ivy2/local/org.netbeans.nbsbt

Q: I got:

[error] Not a valid command: netbeans
[error] Expected '/'
[error] Expected ':'
[error] Not a valid key: netbeans (similar: test, tags, streams)
[error] netbeans
[error]         ^

A: Try to remove the project/target folder under your project base directory, there may be something cached here, and is not updated to the newest condition.

Clone this wiki locally