首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Eclipse SBT依赖库

问Eclipse SBT依赖库
EN

Stack Overflow用户
提问于 2015-06-11 17:03:23
回答 1查看 532关注 0票数 0

在我想要使用激活器eclipse commond之后,我应该看到带有eclipse项目的SBT依赖库容器中的所有jars的项目,就像Maven Dependencies container.How一样?或者sbteclipse插件没有这个功能?

EN

回答 1

Stack Overflow用户

发布于 2015-06-12 03:50:28

这对我来说很有效:

  1. 确保您已经按照描述的here配置了sbteclipse。

您可以在~/.sbt/0.13/plugins/plugins.sbt将其添加到您的sbt配置中:

plugin(“scala”%“sbteclipse-addSbtPlugin”% "3.0.0")

  • Create a com.typesafe.sbteclipse app with activator )

激活器新最小-scala最小-Scala...好的,应用程序"hello-world“是使用"minimal-scala”模板创建的。...

  • 编译并运行应用程序

cd hello-world激活器运行...运行com.example.Hello的信息您好,世界!成功总时间:0秒,已完成2015年6月11日8:50:20 PM

  • 使用激活器创建eclipse项目

激活器eclipse info将当前项目设置为hello-world (在build file:/Users/...)有关为您的项目创建Eclipse项目文件的信息。info已成功为项目创建Eclipse项目文件: info hello-world

这将创建eclipse所需的.project和.classpath文件。

代码语言:javascript
复制
- 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中。

  1. 当您想要更改依赖项时,您可以使用

代码语言:javascript
复制
- 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`)

​

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30776239

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档