简体   繁体   English

Scala,Maven,Sbt和Eclipse

[英]Scala, Maven, Sbt and Eclipse

I am wondering what is the most efficient way to use Sbt and Eclipse together? 我想知道一起使用Sbt和Eclipse的最有效方法是什么? There seems to be a Sbt Eclipse plugin but what is the generally recommended workflow post generating the eclipse config? 似乎有一个Sbt Eclipse插件,但是生成eclipse配置的一般推荐的工作流程是什么? It seems kind of wrong to then add dependencies via the Eclipse Maven plugin in Eclipse? 然后通过Eclipse中的Eclipse Maven插件添加依赖项似乎有点错误? Is that what people usually do though? 人们通常会这样做吗?

Kind of new to the ecosystem so maybe I'm missing something here. 对生态系统来说有点新,所以也许我在这里错过了一些东西。

I add maven dependencies in via the sbt config files. 我通过sbt配置文件添加了Maven依赖项。 Then regenerate the eclipse project after each modification, keeping the sbt config as the definitive project specification. 然后在每次修改后重新生成eclipse项目,并保留sbt config作为最终项目规范。 I suspect it's the only sane way to run the setup. 我怀疑这是运行安装程序的唯一明智的方法。

I use the IvyDE plugin for eclipse with sbt deliver-local. 我将IvyDE插件用于带有sbt Delivery-local的Eclipse。

The advantage here is it can give you separate classpath containers for different configurations easily and you don't need to blat your eclipse project settings regularly. 这样做的好处是可以轻松地为不同的配置提供单独的类路径容器,并且您无需定期添加Eclipse项目设置。

It'd be really nice if scala-ide supported tighter integration with sbt. 如果scala-ide支持与sbt的更紧密集成,那就太好了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM