如何让Eclipse识别来自SBT的依赖项 [英] How to have Eclipse recognize dependencies from SBT

查看:129
本文介绍了如何让Eclipse识别来自SBT的依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找出如何使Eclipse识别使用SBT检索的依赖项? SBT下载正确的依赖关系,并将它们放在我的〜/ .ivy目录中,但eclipse不会看到它们。有没有办法这样做?



谢谢

解决方案

可能不是你正在寻找的答案,我承认它不是优雅的,但它目前适用于我,这意味着我认为我需要更少的时间来定期进行以下工作,而不是研究和寻找更优雅的解决方案。 p>

我假设您正在使用sbt-eclipse插件( https://github.com/ typesafehub / sbteclipse )。当我添加新的依赖项到我的项目(这实际上很少见),我只是从插件重新生成我的eclipse项目文件。缺点是我有一个多模块项目,并且在eclipse中刷新项目后,我需要在eclipse构建路径编辑器中重新添加项目间依赖关系。



像我所说的那样,它很漂亮,但总而言之,我真的不会松动这么多时间。它不漂亮,但它的工作。



最好的运气,
安迪


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

解决方案

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

这篇关于如何让Eclipse识别来自SBT的依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆