How to get sbt-idea for working in scala -2.10 project?

I am having problems with sbt-idea to work in my Scala 2.10 project.

I tried compiling sbt-idea from my git repository, making sure to install

 scalaVersion := "2.10.0-RC5" 

in build/Build.scala and using the publish-local command to compile it in git. But I still keep getting

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

when i use this in my published version let's say just adding

 addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.3.0-SNAPSHOT") 

to the project/plugins.sbt file.

+6
source share
2 answers

Do not think that you need to build SBT for Scala 2.10. I save my eclipse generation and eclipse generators in the global build.sbt file and it works for all my projects (or it seems so ;-)

I use Ubuntu, so when the SBT configuration files are saved on your computer, they can be different.

Create a folder called plugins in the hidden sbt directory. On Linux, this is in ~/.sbt (where the tilde is an alias for your home directory). So now you should have ~/.sbt/plugins

Then create a file called build.sbt in this directory and add the following to it:

 resolvers += "Sonatype snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/" resolvers += "Sonatype releases" at "https://oss.sonatype.org/content/repositories/releases/" addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.1.0") addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.2.0-SNAPSHOT") 

To test, I just generated a Scala 2.10 project with it, and that seems fine.

Oh, the file above also adds support for the eclipse command in SBT if you want to generate Scala -IDE projects.

+7
source

I managed to use an older version of gen-idea by adding the following to project/plugins.sbt in the project itself:

 import sbt._ import Defaults._ libraryDependencies += sbtPluginExtra( m = "com.github.mpeltonen" % "sbt-idea" % "1.2.0", // Plugin module name and version sbtV = "0.12", // SBT version scalaV = "2.9.2" // Scala version compiled the plugin ) 
+3
source

All Articles