从 GWT 1.5 升级到 1.6 时遇到问题; Maven 设置中需要更改什么?
我尝试使用 maven 构建将工作的 GWT 1.5.2 应用程序升级到 1.6.4。 修复所有错误并更新所有已弃用的调用后,它可以很好地编译。
但是当我尝试启动应用程序时什么也没有发生,因为(根据 Firebug)我尝试下载的文件
http://localhost:8080/softwarename/com.myCompany.WorkSpace/undefined
显然是在此之前加载的文件(http://localhost:8080/softwarename/com.myCompany.WorkSpace /com.myCompany.WorkSpace.nocache.js
) 正在尝试获取在 null
字符串中定义的文件。
我需要在设置中更改哪些内容(pom.xml、结构等)才能使其正常工作? 谷歌没有帮助...
更新: 我似乎已经找到了解决方案。 迁移说明经过一些修改后即可使用。 我必须使用 rename-to
属性中的名称在 war 目录中创建目录。
因为 maven 没有从 war 目录中获取 WorkSpace.html,而是从公共目录中获取它,所以我必须从脚本块的路径中删除该文件夹。 我也必须更改 spring security 过滤器路径,因为 url 已从 http://localhost:8080/softwarename/com.myCompany.WorkSpace/WorkSpace.html
更改为 http:// localhost:8080/softwarename/workspace/WorkSpace.html
(其中 workspace
是重命名值)。
现在我只需要让 RPC 调用再次工作......
I've tried to upgrade a working GWT 1.5.2 application to 1.6.4 using maven to build. After fixing all errors and updating all deprecated calls, it compiles nicely.
But when I try to start the application nothing happens, because (according to Firebug) the files I try to download is
http://localhost:8080/softwarename/com.myCompany.WorkSpace/undefined
obviously the file loaded right before this (http://localhost:8080/softwarename/com.myCompany.WorkSpace/com.myCompany.WorkSpace.nocache.js
) is trying to GET a file definied in a null
string.
What do I need to change in the setup (pom.xml, structure etc.) to make it work? Google hasn't helped...
UPDATE:
I've seem to have found the solution. The migration instructions worked with a few modifications. I had to create the directory in the war directory with the name from the rename-to
attribute.
Beacause maven didn't get the WorkSpace.html from the war directory but got it from the public directory i had to remove the folder from the path of the script block. I allso had to change the spring security filter paths because the url has changed from http://localhost:8080/softwarename/com.myCompany.WorkSpace/WorkSpace.html
to http://localhost:8080/softwarename/workspace/WorkSpace.html
(where workspace
is the rename-to value).
Now I just have to get the RPC calls to work again...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想您可能已经被 GWT 1.6 中的新项目结构所吸引。 基本上,您的某些文件需要位于不同的位置。
我按照GWT 1.6 发行说明中的迁移说明获取了我的代码工作。
我们不使用 Maven,所以恐怕我无法帮助您。
I think you might have been caught out by the new Project structure in GWT 1.6. Basically some of your files need to be in different places.
I followed the migration instructions in the GWT 1.6 Release Notes to get my code working.
We don't use Maven so I'm afraid I can't help you there.