【问题标题】:Grails build war file fails with no indication as to whyGrails 构建战争文件失败,没有说明原因
【发布时间】:2013-03-26 16:58:12
【问题描述】:

尝试从运行应用程序(运行良好,完全没有问题)转移到在 Tomcat 上运行。但是,当我们运行 grails test war 时,Building War File... 步骤会失败。

这是控制台输出,我不知道如何强制它告诉我构建的问题。

Loading Grails 2.2.0
| Configuring classpath.
| Environment set to test.....
| Packaging Grails application.....
| Compiling 1 source files.....
| Compiling 33 GSP files for package [infogriz]..
| Compiling 5 GSP files for package [debug].
| Compiling 4 GSP files for package [databaseMigration]..
| Building WAR file.....

然后弹出窗口打开'grails test war' has encountered a problem. Problem executing: test war. 真的很有帮助。

“详细信息”按钮提供了更多详细信息。

Problem executing: test war --stacktrace --verbose
Command terminated with an error code (see details for output)
------System.out:-----------
Loading Grails 2.2.0
| Configuring classpath.
| Environment set to test.....
| Packaging Grails application.....
| Compiling 2 source files.....
| Compiling 33 GSP files for package [infogriz]..
| Compiling 5 GSP files for package [debug].
| Compiling 4 GSP files for package [databaseMigration]..
| Building WAR file.....
------System.err:-----------

有什么想法吗?我尝试添加 --stacktrace 但它仍然没有告诉我为什么它失败了。

编辑。

感谢 Ian 的评论,从命令行运行。新的错误是:

`| Error Error executing script War: : c:\Users\me\git\infogriz\grails -app\migrations does not exist.

我猜我会在午饭后构建那个文件?

【问题讨论】:

  • “弹出窗口打开”建议您在 IDE 中运行它,如果您从命令行运行它会得到更有用的输出吗?
  • 是的,我在 GGTS 中运行它。我将尝试从命令行运行。
  • 尝试grails test war --stacktrace --verbose了解更多信息
  • @BurtBeckwith 查看我更新的问题。添加详细信息也无济于事。看起来我需要在 IDE 之外安装 Grails,然后才能从命令行构建它>.
  • 如果您在 GGTS 中运行一次grails wrapper,您可以在命令行上使用grailsw,而无需单独安装 Grails,它将自动从 Internet 下载所需内容 - ./grailsw test war --stacktrace --verbose

标签: grails


【解决方案1】:

我曾经遇到过这个错误,我通过在预期位置创建迁移文件夹来修复它...

您可能最近更新到了较新版本的 Grails,或者您使用的 Grails 版本比项目属性中配置的 Grails 版本更新。

【讨论】:

    【解决方案2】:

    您是否为您的项目使用版本控制?

    当我将 CVS 配置为修剪空目录时,我也发生了类似的错误。我关闭了这个功能,Grails 构建成功完成。

    【讨论】:

      猜你喜欢
      • 2011-07-16
      • 1970-01-01
      • 2016-09-01
      • 1970-01-01
      • 2020-11-03
      • 1970-01-01
      • 2020-06-19
      • 1970-01-01
      • 2021-05-19
      相关资源
      最近更新 更多