目前,当我尝试在 Eclipse 中运行我的 Google App Engine/Grails 测试应用程序时,我看到了以下警告。

  1. 警告,目标导致名称覆盖 startLogging
  2. 警告:C:\Users\Some Person.grails\1.2.0\projects est-grails\plugins\app-engine-0.8.8\grails-app\conf\spring 未找到。
  3. 警告:C:\Users\Some Person.grails\1.2.0\projects est-grails\plugins\app-engine-0.8.8\grails-app\conf 未找到。
  4. 警告:C:\Users\Some Person.grails\1.2.0\projects est-grails\plugins\app-engine-0.8.8\grails-app\conf\hibernate 未找到。

这是控制台的输出:

Base Directory: C:\Users\Some Person\workspace\test-grails
Resolving dependencies...
Dependencies resolved in 1160ms.
Running script C:\grails-1.2.0\scripts\RunApp.groovy
Environment set to development
Warning, target causing name overwriting of name startLogging
  [groovyc] Compiling 1 source file to C:\Users\Some Person\workspace\test-grails\web-app\WEB-INF\classes
     [copy] Copying 1 file to C:\Users\Some Person\.grails\1.2.0\projects\test-grails
     [copy] Copying 1 file to C:\Users\Some Person\workspace\test-grails\web-app\WEB-INF
Configuring persistence for AppEngine
     [copy] Warning: C:\Users\Some Person\.grails\1.2.0\projects\test-grails\plugins\app-engine-0.8.8\grails-app\conf\spring not found.
     [copy] Warning: C:\Users\Some Person\.grails\1.2.0\projects\test-grails\plugins\app-engine-0.8.8\grails-app\conf not found.
     [copy] Warning: C:\Users\Some Person\.grails\1.2.0\projects\test-grails\plugins\app-engine-0.8.8\grails-app\conf\hibernate not found.

使用 Spring Tools Suite (STS) 创建 Grails 项目,然后安装应用程序引擎插件“grails install-plugin app-engine”后,出现此错误。之前,我安装了应用程序引擎插件,Grails 项目运行正常。

有什么想法如何解决这些警告吗?

有帮助吗?

解决方案

警告 1 是由 Grails 脚本中的问题引起的。我查看了 JIRA,但没有看到与之相关的错误报告。我不认为它会引起任何副作用。

警告 2,3 和 4 指的是应用程序引擎插件内的文件夹。即使他们很烦人,他们也不会造成任何伤害。您可以做的最好的事情是针对应用程序引擎插件提出 JIRA,要求作者添加这些文件夹以停止警告。

其他提示

您确实使用以下命令创建了应用程序 grails create-app, , 正确的?那应该已经创建了 conf (和 hibernatespring 在它下)grails 项目根目录下的文件夹。

如果您通过 IDE 运行,那么 IDE 可能不会 “看” 文件夹,因为它们是空的,这本身也是一个错误。

在撰写本文时,不要使用 Spring Tools Suite 创建 grails 应用程序,因为 1)它仍然是新的并且不够成熟,2)它更改了一些默认设置并导致许多问题,特别是如果您混合命令行执行。

使用 Netbeans 或 IntelliJ。为了创建 Grails 应用程序,我从 Eclipse 切换到 Netbeans,尽管我是 Eclipse 的忠实支持者。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top