How to migrate a a custom sublass of GWT DevMode to GWT 2.7.0 Super dev mode

我怕爱的太早我们不能终老 提交于 2020-01-16 18:35:48

问题


For a long while we were running our GWT-based application in Eclipse using custom subclasses of com.google.gwt.core.ext.ServletContainerLauncher and com.google.gwt.dev.DevMode.

This was to allow us to run our custom (newest) Jetty and, over time, it gave us some other control, i.e. launching the server just a bit differently in Eclipse so as to allow files to be spread around Eclipse projects instead of being where they end up in production.

These were effectively displacing/reimplementing/overriding bits of JettyLauncher.java and DevMode.java

Right now I am trying to upgrade to GWT 2.7 and this no longer works. Specifically it starts with:

Started code server on port 9997
Loading modules
   com.<...>.ClientDev
      Public resources found in...
      Translatable source found in...
Starting HTTP on port 8008

All I get is that the infamous "GWT module "client" may need to be (re)compiled". I see that the Eclipse launch configuration now offers the choice between super dev mode and a "classic" one. I didn't change that yet (still at "classic") but the idea is that we need to move on to Super Dev Mode (predominantly because of speed and support, but classic features and debugging in IDE will be missed).

I tried to find documentation on what changed (or needs to be changed in code such as mine) to get over to 2.7 but failed so far. Can anyone help?

Thanks!


回答1:


I didn't find any documentation but I succeeded to get started. Here are the things that I had to do:

  1. I actually didn't have to change my launcher/dev mode code at all.
  2. Eclipse *.launch file had to be modified to add -nosuperDevMode argument. I could not get the super dev mode to work within it due to the conflict between its own embedded container and my newer version and I did not want to spend time solving this.
  3. Create a new way to independently launch com.google.gwt.dev.codeserver.CodeServer with the following arguments: -bindAddress [same-address-as-for-the-main-one] -port 9876 -launcherDir [war-folder-path] [GWT-module-name]
  4. Clear all the cookies. CodeServer had buffer overruns (http error 413) because I had too many cookies for it.
  5. Access the CodeServer URL directly to add the two bookmarklets (Dev Mode On, Dev mode Off) to the browser.
  6. I precompiled my app once just to make sure I have the structures but this should not be necessary, I think.
  7. Start my server first.
  8. Start the code server second.
  9. Turn dev mode on using the bookmarklet.
  10. Access my app.


来源:https://stackoverflow.com/questions/30091786/how-to-migrate-a-a-custom-sublass-of-gwt-devmode-to-gwt-2-7-0-super-dev-mode

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