Run SBT Task from Eclipse

Arne picture Arne · Mar 19, 2012 · Viewed 9.5k times · Source

I am using SBT as a build manager, and Eclipse as my IDE, or at least I want to. The problem is more, how do I run specific SBT tasks from Eclipse. I have properly exported the project to Eclipse, and Eclipse is very helpful while writing the code, but how can I use Eclipse as a frontent for SBT. How can I start an SBT run command from eclipse? How can I start an SBT test command?

Answer

Nicolas picture Nicolas · Mar 19, 2012

Unfortunately, at the moment, there is no integration of SBT in eclipse. The sole plugin that goes in that direction seems abandoned and is quite useless: http://www.assembla.com/spaces/sbt-eclipse-integration/wiki

A solution is to integrate a terminal into eclipse to run sbt command. If you want to do it, the documentation is here: Is there an Eclipse plugin to run system shell in the Console?

If you are open to other IDE, and if integration is mandatory for you, you can use IDEA and its SBT plugin: https://github.com/orfjackal/idea-sbt-plugin

As far as I'm concerned, I keep using a shell window beside my eclipse, using key shortcut to switch between them.