Search code examples
eclipsescalasbtsbteclipse

How to have Eclipse recognize dependencies from SBT


I am trying to figure out how to make Eclipse recognize dependencies that are retrieved using SBT? SBT download the correct dependencies and puts them in my ~/.ivy directory but eclipse doesn't see them. Is there a way to do this?

thanks


Solution

  • This is probably not the answer you are looking for and I admit it is not elegant but it currently works for me, meaning that I think it takes less time for me to periodically do the following instead of researching and finding a more elegant solution.

    I assume you are using the sbt-eclipse plugin ( https://github.com/typesafehub/sbteclipse ). When I add new dependencies to my project ( which is actually pretty rare ) I simply regenerate my eclipse project files from the plugin. The downside of this is that I have a multiple module project and after I refresh the projects in eclipse I need to re-add the inter-project dependencies in the eclipse build path editor.

    Like I mentioned it is pretty hacky but all in all I really don't loose that much time doing it. It's not pretty but it works.

    Best of luck, Andy