1

how to integrate SBT scala in eclipse? i am following this post as well as

i want to add existing project in scala. how to compile it and how to use build.sbt in eclipse?

SBT integration test setup

and http://grosdim.blogspot.in/2013/01/quick-sbt-tutorial.html

but not finding any useful please help me

how to compile and execute a existing project in eclipse using build.sbt??

Community
  • 1
  • 1
user3408937
  • 49
  • 2
  • 9
  • Can you explain what you have right now? an Eclipse project, a sbt project, something else... And what you expect? – skyluc Mar 25 '14 at 19:55

1 Answers1

2

You can't use build.sbt in Eclipse directly. Instead you need to generate an Eclipse project from your SBT project using sbteclipse plugin. Quoting the README:

  • Add sbteclipse to your plugin definition file. You can use either:

    • the global file (for version 0.13 and up) at ~/.sbt/0.13/plugins/plugins.sbt

    • the project-specific file at PROJECT_DIR/project/plugins.sbt

      addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.4.0")
      
  • In sbt use the command eclipse to create Eclipse project files

    > eclipse
    
  • In Eclipse use the Import Wizard to import Existing Projects into Workspace

See the github wiki for more usage details. Don't forget to rerun eclipse command after changes in your SBT project.

Alexey Romanov
  • 167,066
  • 35
  • 309
  • 487
  • after running sbt in command line i am getting >> Set current project to default-6c6f02 (in build file:/home/user_name/Videos/hello_scala/) and what to set and how please?? heere hello_scala is my project name – user3408937 Mar 12 '14 at 06:54