【问题标题】:Warning message running Play - activator eclipse运行 Play 的警告消息 - 激活器 eclipse
【发布时间】:2016-09-23 15:10:48
【问题描述】:

我从这里下载了播放框架:

https://www.playframework.com/download

我选择了离线分发下载。

我设置了路径环境变量并添加了这个:

C:\Framework\activator-dist-1.3.10\bin

在尝试创建一个新项目时,我在 cmd "activator new" 中编写了它并且它有效。 比我写的 activator eclipse 但我得到了这个错误:

C:\Users\***\Desktop\***\FirstPlayProject>activator eclipse
ACTIVATOR_HOME=C:\Framework\activator-dist-1.3.10
The system cannot find the file BIN_DIRECTORY\..\conf\sbtconfig.txt.
[info] Loading project definition from C:\Users\***\Desktop\·δ≡σ·\FirstPlayPro
ject\project
[info] Updating {file:/C:/Users/***/Desktop/%D7%AA%D7%9B%D7%A0%D7%95%D7%AA/Fir
stPlayProject/project/}firstplayproject-build...
[info] Resolving com.typesafe.akka#akka-persistence-experimental_2.10;2.3.11 ...
[info] Resolving com.fasterxml.jackson.datatype#jackson-datatype-jsr310;2.5.4 ..
[info] Resolving org.scala-sbt.ivy#ivy;2.3.0-sbt-2cc8d2761242b072cedb0a04cb39435
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Set current project to FirstPlayProject (in build file:/C:/Users/***/De
sktop/%D7%AA%D7%9B%D7%A0%D7%95%D7%AA/FirstPlayProject/)
[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]

可能是因为这个错误:The system cannot find the file BIN_DIRECTORY\..\conf\sbtconfig.txt.

【问题讨论】:

  • 它应该做什么而不是做什么?
  • 之后我可以将项目导入 Eclipse。

标签: eclipse playframework playframework-2.5 typesafe-activator


【解决方案1】:

您需要添加sbteclipse 才能使用。在您的 project/plugins.sbt 文件中,添加以下内容:

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")

然后首先编译您的应用程序(compile 在激活器外壳中)。然后就可以在激活器shell中使用eclipse命令了。

更多信息:https://www.playframework.com/documentation/2.5.x/IDE#Eclipse

【讨论】:

  • 我应该在哪里找到 project/plugins.sbt 文件?
  • 在您的项目文件夹中。它与appconflogspublic 文件夹并排
  • 现在效果很好。我有 2 个问题:1. 每个项目我都应该添加这个?:addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0") 2. 你知道为什么我在每个激活器命令后都会收到此消息吗?:The system cannot find the file BIN_DIRECTORY\..\conf\sbtconfig.txt.
  • 1) 仅当您想使用 eclipse 命令时才需要它。我从来没有在 Play 中使用过 Ecipse,但是例如 IntelliJ,可以在没有任何命令的情况下导入项目。 2)这只是一个警告。该文件用于指定 Windows 中 sbt 的选项。如果您想让消息消失,只需在 Activator 文件夹的conf 目录中创建一个具有该名称的空文件(即activator-dist-1.3.10/conf,而不是您的项目conf 文件夹)
猜你喜欢
  • 1970-01-01
  • 2016-08-21
  • 2014-08-03
  • 1970-01-01
  • 1970-01-01
  • 2017-01-08
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多