GWT编译的一些细微之处 - “gwt模块可能需要(重新)编译”。 [英] Some subtlety of GWT compilation - "gwt module may need to be (re)compiled."

查看:373
本文介绍了GWT编译的一些细微之处 - “gwt模块可能需要(重新)编译”。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在向GAE部署应用程序。我在Eclipse中有一个单独的项目设置,包含三个独立的GWT模块,每个模块都有自己的HTML页面,入口点等等。它们共享很多代码。



当我将应用程序部署到appengine,两个模块工作正常。我可以完美地访问他们的HTML页面。第三个给我的错误,gwt模块'xyz'可能需要(重新)编译。我曾尝试重新编译和重新部署两次,但都没有成功,并且没有任何关于前进的想法。



有关此问题的其他线程指向gwt.codeserver参数, ,如果我添加了这个参数,坏模块会运行......但它似乎在开发模式下运行如果这是真的,我有点担心,因为我不想向任何人提供开发模式代码。



任何建议都会受到欢迎 - 我的工作基本上完全停滞在这个问题上。

解决方案

我找到了自己的答案:在我的情况下,错误不是由缺少 gwt.codesvr 参数引起的(如同所有其他情况我在网上查到)。相反,在我的模块定义文件 gwt.xml 文件中添加的模块重命名属性导致混淆。我会重新计算整个故事,以帮助其他人了解更多信息。


  1. 我创建了一个新模块和一个新的HTML页面。

  2. 模块名称为 com.reallylong.and.unwieldy ,我的HTML页面从 com.reallylong.and.unwieldy / com.reallylong.and.unwieldy.nocache.js

  3. 后来,我变得聪明并使用 rename-to 属性重命名
    com.reallylong.and.unwieldy 改为short,不改变我的HTML代码。
    我忘了。

    $ b $这几天没有影响我,因为我认为eclipse足够聪明,可以重新编译文件或其他东西。谁知道。我怀疑 gwt.codesvr 参数实际上启用了这种模糊行为,从dev模式而不是从js文件加载代码。



    最终,修正很简单:我更改了我的HTML文件,以便js从 short / short.nocache.js 中拉出。
    它的工作!
    呜呼!


    I'm deploying an app to GAE. I have a single project setup in Eclipse, with three separate GWT modules, each with its own HTML page, entry point, etc. They share a lot of code.

    When I deploy the app to appengine, TWO of the modules work fine. I can access their HTML pages perfectly. The third gives me the error that "gwt module 'xyz' may need to be (re)compiled." I have tried recompiling and redeploying twice, to no avail, and have no ideas about moving forward.

    Other threads about this problem point to the gwt.codeserver argument, and indeed, if I add that argument, the bad module runs... but it seems to be running in dev mode! If this is true, I'm a little bit apalled, since I don't want to serve dev mode code to anyone.

    Any suggestions would be welcome - my work is basically entirely stalled on this issue.

    解决方案

    I've found my own answer: in my case, the error was not being caused by a missing gwt.codesvr argument (as in all other cases I found referenced online). Instead, a module rename-to attribute I added in my module definition gwt.xml file caused a mixup. I'll recount the whole story in case it helps others understand more.

    1. I created a new module and a new HTML page.
    2. The module's name was com.reallylong.and.unwieldy, and my HTML page pulled in the javascript from com.reallylong.and.unwieldy/com.reallylong.and.unwieldy.nocache.js.
    3. Later, I got smart and used the rename-to attribute to rename com.reallylong.and.unwieldy to "short," not changing my HTML code. I forgot.

    This didn't affect me for several days, since I guess eclipse is smart enough to recompile both files, or something. Who knows. I suspect the gwt.codesvr argument was actually enabling this obscuring behavior, loading the code from dev mode instead of from the js file.

    Ultimately, the fix was simple: I changed my HTML file so that the js was being pulled from short/short.nocache.js. And it worked! Woohoo!

    这篇关于GWT编译的一些细微之处 - “gwt模块可能需要(重新)编译”。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆