0

I Have downloaded couple of projects from github , which are sbt projects, and imported in Scala IDE. But When I try to run them...they are not showing in run configuration.

I think for sbt project there is some another way to import in eclipse.

Please Help.

Attaching the screenshot of the project.

[Screenshot]

2 Answers2

1

you should convert it to eclipse projects first.

1.you need to add eclipse plguins in your project/plugins.sbt, something like this: addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")

2.run sbt In CLI from your peoject fold and type eclipse, wait util it successes. Now , you can import it to eclipse (eclipse project needs .project and .classpath the two files)

BTW, sbt and eclipse command may be a little slow, be patient.

Hope it helps.

jenkin
  • 148
  • 9
  • I found in this solution, I am not sure where to put this file plugins.sbt as i cannot see any such file in the imported git project. – Hromit Prodigy Jun 27 '16 at 08:13
  • and what if lets say i build the project this way successfully, but later on if i am to add new dependencies inside build.sbt., then again I have to go through the same procedure? – Hromit Prodigy Jun 27 '16 at 08:15
  • No then you do not have to go with the same procedure – Shivansh Jun 27 '16 at 08:15
  • one more question Is there any hard rule, that the scala (if i ahve installed in my system) and that what project is using (scala version) & scala of scala IDE. All three versions must be same? – Hromit Prodigy Jun 27 '16 at 08:18
  • @HromitProdigy Intellij IDEA can import sbt project without these procedure . But for eclipse, this is the only way i know , could you check if existing a fold named peoject ? – jenkin Jun 27 '16 at 08:19
  • @HromitProdigy scala IDE version doesn't need the same version. But the other two maybe need to be the same. If you had see get started in scala offical website. you'll know how to start with sbt and using eclipse with scala project – jenkin Jun 27 '16 at 08:22
  • @HromitProdigy could you paste the git url ? – jenkin Jun 27 '16 at 08:26
  • @jenkin i haev added the screenshot of current imported project inside eclipse. – Hromit Prodigy Jun 27 '16 at 08:27
  • @HromitProdigy did you install sbt in your env ? – jenkin Jun 27 '16 at 08:32
  • @jenkin for one on the project, yes there is a project folder and inside it there is a file, plugins.sbt. – Hromit Prodigy Jun 27 '16 at 08:35
  • @jenkin But why not for other imported projects, Are those prpjects build under IntelliJ IDEA? – Hromit Prodigy Jun 27 '16 at 08:36
  • @jenkin and for thar project addSbtPlugin("com.websudos" % "phantom-sbt" % "1.13.0") -- is written , are you aware of what Phantom-sbt is ? – Hromit Prodigy Jun 27 '16 at 08:38
  • @HromitProdigy maybe you'll know something if you do it by your hands. – jenkin Jun 27 '16 at 08:39
  • @HromitProdigy 1.install sbt and make sure you can run sbt from cli - 2.download zip from that demo project and run sbt . then you'll see project fold. each plugin has its own use you can google it if you want to know – jenkin Jun 27 '16 at 08:40
  • @jenkin now i facing Error: Could not find or load main class ?-XX:PermSize=4096m when i type scala or sbt on command prompt. – Hromit Prodigy Jun 27 '16 at 09:09
0

Finally, What I Understood is, For Scala SBT Development, IntelliJ is the preferred IDE. Almost All projects which are hosted on Github have build.sbt in it. Like for Android Development everyone prefers Android Studio. LikeWise for scala use IntelliJ at least for now.