How to use sbt-eclipse to create Eclipse project files of a project?(如何使用 sbt-eclipse 创建项目的 Eclipse 项目文件?)
问题描述
我按照官方文档在我的sbt项目中设置插件:
I followed the official documentation to set up the plugin in my sbt project:
- 添加
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" %"2.5.0")
到~/.sbt/plugins/plugins.sbt
文件 cd
ed 到一个项目并运行sbt
- 在 sbt shell 中,输入
eclipse
- Added
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.5.0")
to~/.sbt/plugins/plugins.sbt
file cd
ed to a project and ransbt
- In sbt shell, typed
eclipse
这就是我遇到以下错误的地方:
That's where I faced the following error:
> eclipse
[error] Not a valid command: eclipse (similar: help, alias)
[error] Not a valid project ID: eclipse (similar: sbteclipse)
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: eclipse (similar: deliver, licenses, clean)
[error] eclipse
[error] ^
我错过了什么?
提前感谢您能给我的任何帮助.
Thanks in advance for any help you can give me.
$ /opt/sbt-0.13.5/bin/sbt
[warn] The global sbt directory is now versioned and is located at /Users/first.last/.sbt/0.13.
[warn] You are seeing this warning because there is global configuration in /Users/first.last/.sbt but not in /Users/first.last/.sbt/0.13.
[warn] The global sbt directory may be changed via the sbt.global.base system property.
[info] Loading project definition from /Users/first.last/git/myproject/project
[info] Set current project to myproject (in build file:/Users/first.last/git/myproject/)
> eclipse
[error] Not a valid command: eclipse (similar: help, alias)
[error] Not a valid project ID: eclipse
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: eclipse (similar: deliver, licenses, clean)
[error] eclipse
[error] ^
推荐答案
我使用的是 sbt 0.13.5.
I'm using sbt 0.13.5.
$ sbt --version
sbt launcher version 0.13.5
在 empty 目录中执行 sbt about
以检查 build/sbt 设置.
In an empty directory executed sbt about
to check the build/sbt setup.
$ sbt about
[info] Loading global plugins from /Users/jacek/.sbt/0.13/plugins
[info] Updating {file:/Users/jacek/.sbt/0.13/plugins
本文标题为:如何使用 sbt-eclipse 创建项目的 Eclipse 项目文件?
基础教程推荐
- 如何使用 Stream 在集合中拆分奇数和偶数以及两者的总和 2022-01-01
- 在螺旋中写一个字符串 2022-01-01
- Spring Boot Freemarker从2.2.0升级失败 2022-01-01
- 由于对所需库 rt.jar 的限制,对类的访问限制? 2022-01-01
- 如何使用 Eclipse 检查调试符号状态? 2022-01-01
- 如何强制对超级方法进行多态调用? 2022-01-01
- 如何对 HashSet 进行排序? 2022-01-01
- Java 中保存最后 N 个元素的大小受限队列 2022-01-01
- 如何在不安装整个 WTP 包的情况下将 Tomcat 8 添加到 Eclipse Kepler 2022-01-01
- 首次使用 Hadoop,MapReduce Job 不运行 Reduce Phase 2022-01-01