Question

I just read the GWT Guide for Compiling and Debugging and have several similarly-related questions:

  1. What's an example use case for the -whitelist and -blacklist DevMode options and why are they not available for production mode?
  2. Difference between DevMode and HostedMode? Use cases for both?
  3. What sort of "extra" stuff happens when you specify the -extra flag?
  4. What is -workDir and why must it be writeable? What gets written there? What can I use it for?
  5. Is the embedded Jetty instance the same as the codeserver? If not, what is the difference?
  6. Where does the "story of your compile" report (soyc) get generated and how to configure this location?

These questions are so closely-related I figured it would be better to ask them all up front rather than spam SO with 6 different micro-questions. Thanks in advance!

Was it helpful?

Solution

  1. -whitelist and -blacklist are actually never used. They're a left over from the legacy hosted mode which embedded a browser widget (and could control the Same-Origin Policy), rather than being embedded in the browser through a plugin.

  2. HostedMode is currently the same as DevMode. It only exists for backwards-compatibility (see above)

  3. properties files for all your Messages and Constants for all your locales (provided you configured a @Generate for those) to make it easier to bootstrap I18N, compile report –if you also pass -compileReport–, CSS maps of obfuscated CssResource class names, and logs of GWT-RPC serialization policies (which classes were included/excluded and why).

  4. -workDir is where GWT writes most of it's temporary data (not all, some things go to the OS temporary folder –configurable with the -Djava.io.tmpdir= system property– or to a .gwt-unitCache folder –configurable with the -Dgwt.persistentunitcachedir= system property–). When you do distributed builds, the workDir has to be shared by all machines (either shared on the network, or by copying files around).

  5. In DevMode, the embedded Jetty server runs your webapp (your server code and your static resources) from the -war folder (defaults to war/ in the current directory). The codeserver is what serves your client code. In DevMode, the codeserver uses a raw TCP connection to communicate with the plugin that sits in your browser; in SuperDevMode, the codeserver is a Jetty instance that serves JavaScript compiled (almost) on the fly, it doesn't host your webapp though.

  6. See #3 above, and http://www.gwtproject.org/doc/latest/DevGuideCompileReport.html

BTW, the GWT project now has a new home: http://www.gwtproject.org

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top