GWT designer doesn't work with Maven-GWT project

丶灬走出姿态 提交于 2019-12-10 13:14:38

问题


I just started a GWT project with environment:

  • Eclipse Helios
  • google plugin for Eclipse 3.6
  • maven2 plugin for eclipse
  • Gwt designer for eclipse 3.6

The project is created by gwt-maven-plugin. The project can run in dev mode. But GWT Designer doesn't work for client GUI class. I removed Maven dependencies for GWT and directly import Eclipse GWT SDK, GWT Designer starts working for client GUI class. But it still doesn't work for UiBuilder template file.

The error message is : UIBinder template should be in client package.

You are attempting to use UiBinder for /hsp-web/src/main/java/com/hs/hspweb/client/ui/UserListViewImpl.ui.xml, however it is not in GWT client package.


回答1:


Go to "Java build path" in project properties, click on "YourProjectName/src/main/resources" -> "Excluded: **" entry and press "Remove" button. It should change to "Excluded: (None)" Then, you will be able to open GWT designer.




回答2:


I found the solution here. http://mojo.codehaus.org/gwt-maven-plugin/eclipse/google_plugin.html

A restriction of this plugin is that it will search for gwt modules and host pages only in the first classpath source folder. Using a Maven / Eclipse integration like m2eclipse, this one will be your sourceDirectory (src/main/java). You'll have to move your gwt.xml files in this folder, instead of the standard Maven resource directory. See Google Eclipse Plugin issue #1597.



来源:https://stackoverflow.com/questions/5518707/gwt-designer-doesnt-work-with-maven-gwt-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!