我在
Scala 2.10项目中使用
sbt-idea工作时遇到了很多麻烦.
我尝试从它的git repo编译sbt-idea,确保设置
scalaVersion := "2.10.0-RC5"
在build / Build.scala中,并使用publish-local命令在git中编译它.但我仍然坚持下去
[error] sbt.IncompatiblePluginsException: Binary incompatibility in plugins detected.
当我在我发布的版本中使用它时,简单地说添加
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.3.0-SNAPSHOT")
到project / plugins.sbt文件.
解决方法
不认为你需要为Scala 2.10构建SBT.我保留了我的创意和eclipse项目生成器在全局build.sbt文件中,它适用于我的所有项目(或者看起来似乎;-)
我正在使用Ubuntu,因此SBT配置文件保存在您的计算机上可能会有所不同.
在隐藏的sbt目录下创建一个名为plugins的文件夹.在Linux上,它位于〜/ .sbt(其中,tilde是主目录的别名).所以现在你应该有〜/ .sbt / plugins
然后在此目录下创建一个名为build.sbt的文件,并将以下内容添加到其中:
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")
为了测试,我刚用它生成了一个scala 2.10项目,看起来很好.