How to install sbt-idea and use gen-idea [closed]
Asked Answered
T

1

6

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.

Thuythuya answered 9/12, 2013 at 6:19 Comment(1)
This 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.Hemichordate
R
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.

Raffia answered 9/12, 2013 at 6:50 Comment(4)
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)Thuythuya
When you do this in IDEA, for example with sbt plugin, then IDEA should pop-up with a reload project window.Raffia
Is gen-idea still needed when we are using idea sbt and Scala plugins?Dnepropetrovsk
It has to be 1.6.0 only now. 1.6.0-SNAPSHOT is a 404Ink

© 2022 - 2024 — McMap. All rights reserved.