gwt - GWT grails插件错误resource.ResourceMeta-找不到资源:%nocache.js

标签 gwt grails grails-plugin

我在使用GWT-Grails插件时遇到了麻烦。我尝试完全按照此示例进行操作,但最终出现此错误:

| Error 2012-10-28 00:25:49,567 [http-bio-8080-exec-2] ERROR resource.ResourceMeta  -  Resource not found: /gwt/g3wt.Application/g3wt.Application.nocache.js

输入以下命令后出现此错误:(我只是遵循本指南here)
>grails create-app g3wt
>cd g3wt
>grails install-plugin gwt
>grails create-gwt-module g3wt.Application
>grails create-gwt-page main/index.gsp g3wt.Application
>grails run-app
>grails run-gwt-client

这是index.gsp代码(无论如何都会自动生成):
<html>
<head>
  <!-- Integrate with Sitemesh layouts           -->
  <meta name="layout" content="main" />

  <!--                                           -->
  <!-- Any title is fine                         -->
  <!--                                           -->
  <title>Example title (change this!)</title>

  <!--                                           -->
  <!-- This script loads your compiled module.   -->
  <!-- If you add any GWT meta tags, they must   -->
  <!-- be added before this line.                -->
  <!--                                           -->
  <script type="text/javascript" src="${resource(dir: 'gwt/g3wt.Application', file: 'g3wt.Application.nocache.js')}"></script>
</head>

<!--                                           -->
<!-- The body can have arbitrary html, or      -->
<!-- you can leave the body empty if you want  -->
<!-- to create a completely dynamic ui         -->
<!--                                           -->
<body>
  <!-- OPTIONAL: include this if you want history support -->
  <iframe id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe>

  <!-- Add the rest of the page here, or leave it -->
  <!-- blank for a completely dynamic interface.  -->
</body>
</html>

我知道找不到nocache.js,所以我想我可以尝试看看它到底在哪里。但是,使用eclipse搜索功能,它表明根本没有创建该文件。尽管有一个名为application.js的文件。

为什么未创建nocache.js,我该如何解决?我已经很困惑了一段时间,这很令人沮丧。

我正在使用gwt插件0.7.1和grails 2.1.1,以及Eclipse 4.2和Linux计算机。

最佳答案

我遇到了同样的问题,发现了answer here.
buildconfig.groovy在conf文件夹中。只需注释掉运行时为“:resouces ...”的插件即可

关于gwt - GWT grails插件错误resource.ResourceMeta-找不到资源:%nocache.js,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13102177/

相关文章:

java - GWT 序列化是否支持 writeObject() 和 readObject()?

css - 在 css url 中使用 ClientBundle 图像资源

Grails - 具有级联删除的同一类的多个belongsTo

grails - 如何在 Grails 中创建动态域类

grails - Grails集成测试 Controller 不能重复使用?

grails - 为什么我无法使用 grails 框架 1.3.7 中安装的 spring security 和 weceem 插件登录

java - 限制 GWT 中的小数位数?

grails - 找不到Grails独立插件

grails - 将插件添加到Grails时为什么会收到ClassNotFoundException?

java - GWT 服务器端与数据库的交互