在我想要使用激活器eclipse commond之后,我应该看到带有eclipse项目的SBT依赖库容器中的所有jars的项目,就像Maven Dependencies container.How一样?或者sbteclipse插件没有这个功能?
发布于 2015-06-12 03:50:28
这对我来说很有效:
您可以在~/.sbt/0.13/plugins/plugins.sbt将其添加到您的sbt配置中:
plugin(“scala”%“sbteclipse-addSbtPlugin”% "3.0.0")
激活器新最小-scala最小-Scala...好的,应用程序"hello-world“是使用"minimal-scala”模板创建的。...
cd hello-world激活器运行...运行com.example.Hello的信息您好,世界!成功总时间:0秒,已完成2015年6月11日8:50:20 PM
激活器eclipse info将当前项目设置为hello-world (在build file:/Users/...)有关为您的项目创建Eclipse项目文件的信息。info已成功为项目创建Eclipse项目文件: info hello-world
这将创建eclipse所需的.project和.classpath文件。
- Select from the menu: `File > Import...`
- Type `ex` in the text field that filters project types and select `Existing Projects into Workspace`
- Select your project folder with `Browse...` button and click Finish现在,您应该会在eclipse中看到您的项目,其中包含sbt构建规范中的所有依赖项(例如,build.sbt)。sbt依赖关系出现在Referenced Libraries中。
- edit your `build.sbt`
- run `activator eclipse` again
- select the project in Eclipse and refresh (e.g. hit F5 key or right click and `refresh`)
https://stackoverflow.com/questions/30776239
复制相似问题