Recent versions of Idea (14 at the time of writing) play along quite nicely with SBT (Simple Build Tool - not so simple in fact). It can load project definitions, even when multiple subprojects are defined, and work with them. Unfortunately, it does the reading only once, when you import the project into the IDE. If you update your definitions afterwards, for example, when you add a new dependency, Idea might not be aware of the change. How to fix that?

It is quite simple, actually. From View menu choose SBT (not SB Console which is right next to it) and click the refresh button. It will force the environment to reload the SBT definitions and will update everything there is to update. And that's it, quite simple, actually!

Another thing you could do is to use SBT tasks from Run/Debug configurations in Idea. You can (and probably should) replace the default "Make" task with some corresponding sbt one, say, sbt compile. If you want to debug some unit tests, use sbt test:compile instead, since the regular compile ignores your src/test code and only compiles src/main, which is the right thing to do.

Tags: None
Categories: None |

0 comments have been posted.

Your email: we will send you a confirmation link to this address to confirm your identity and to prevent robot posting
Get in touch
»...«
Follow updates

Join our social networks and RSS feed to keep up to date with latest news and publications