SBT, dependencies, classpath and editors

混江龙づ霸主 提交于 2019-12-10 17:41:21

问题


I recently updated my sbt setup to version 0.11. As you may know, new SBT uses .ivy2 folder to store/cache all the retrieved jar files. I am using IntelliJ and I would like to know what is the recommended way of importing dependencies to the editor's classpath.

One option is to manually visit .ivy2 folder and select the dependencies. Is there a better/easier way to doing this?


回答1:


I presume you use the SBT-plugin. According to the instructions on the linked page:

After each change to your dependencies, run gen-idea in the SBT Console. When prompted, reload the project.

I usually run gen-idea no-classifiers no-sbt-classifiers (see under "Usage" on github). IntelliJ (11 RC) will then ask you to reload the project, which is usually quite fast. Then the references to your SBT dependencies will be available.




回答2:


You can try IvyIDEA plug-in.



来源:https://stackoverflow.com/questions/7937609/sbt-dependencies-classpath-and-editors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!