Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding and removing dependencies with SBT and Scala IDE

I've been experimenting with SBT and the Scala IDE (Eclipse) and I'm wondering - what's the standard workflow for adding and removing dependencies from your build.sbt file where the project's referenced libraries will be updated in Eclipse?

Are there any current plugins that are required to use sbt with eclipse when adding / removing dependencies?

like image 784
Josh Avatar asked Sep 11 '11 19:09

Josh


2 Answers

The sbteclipse plugin will do it. The key is that whenever you change your dependencies you need to re-run the command to create the Eclipse files. I use:

eclipse same-targets

Then you need to right-click on the project in Eclipse and choose Refresh.

like image 193
David Eagen Avatar answered Oct 16 '22 19:10

David Eagen


I also needed this. I can confirm that re-running the eclipse task from the sbteclipse plugin (version 1.3-RC3 for SBT 0.10.1) will indeed regenerate the Eclipse project files (these are .project and .classpath). If you're seeing something else, it sounds like a bug that should be reported.

like image 27
Kipton Barros Avatar answered Oct 16 '22 21:10

Kipton Barros