I have downloaded and installed sbt and plugin for gen-idea. But the built projects can not be run on idea. Also the "project" folder is not generated when I run gen-idea. Can someone please tell me how I should install sbt and sbt-idea plugin and configure it, as I think the problem here is configuring.
Asked
Active
Viewed 9,313 times
6
-
1This question appears to be off-topic because it is about proper installation and configuration of the plugin. A better answer would be found within the plugin documentation. – pagoda_5b Jan 10 '14 at 13:35
1 Answers
8
In all sbt projects you have a project
folder (in the root of your project directory). You need to create there a file called - plugins.sbt
and place there:
resolvers += "Sonatype snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/"
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.6.0-SNAPSHOT")
Notice that i have a blank line between. Then, if you have an opened sbt session call reload
command, you can call gen-idea
to generate idea files, also i recomend to add sbt-classifiers
to download sources.
Otherwise you can make this plugin visible globally to all your sbt project, by placing the same two line in the ~/.sbt/0.13/plugins/build.sbt
file.
When you have generated this project, in IDEA choose Open Project
and choose your newly generated project. This should work, if not, provide some additional info.
-
thanks. I did same. but after opening it in idea I tried to run it. It says Exception in thread "main" java.lang.RuntimeException: Wrong arguments: [scala.tools.nsc.CompileClient] at org.jetbrains.plugins.scala.compiler.rt.ClassRunner.main(ClassRunner.java:30) – bula Dec 09 '13 at 07:05
-
1When you do this in IDEA, for example with sbt plugin, then IDEA should pop-up with a `reload project` window. – 4lex1v Dec 09 '13 at 07:06
-
1
-
2