tbroyer / gwt-maven-plugin

Starting fresh on building GWT projects with Maven
https://tbroyer.github.io/gwt-maven-plugin/
Apache License 2.0
169 stars 41 forks source link

Problems using devmode #60

Closed mtmmtm9 closed 8 years ago

mtmmtm9 commented 8 years ago

when running "mvn gwt:devmode" from gwt-2.8.0-rc1\samples\DynaTableRf and launching my browser at: http://127.0.0.1:8888/DynaTableRf.html I sometimes (90%) get "not found" when the browser accesses DynaTableRf.html.

codeserver starts with these args: 00:00:00.002 [INFO] Running CodeServer with parameters: [-noprecompile, -port, 9876, -sourceLevel, 1.8, -bindAddress, 127.0.0.1, -workDir, C:\gwt-2.8.0-rc1\samples\DynaTableRf\target\gwt\devmode\work, -launcherDir, C:\gwt-2.8.0-rc1\samples\DynaTableRf\target\DynaTableRf-1.0-SNAPSHOT, -logLevel, INFO, -style, OBFUSCATED, com.google.gwt.sample.dynatablerf.DynaTableRf]

The file DynaTableRf.html is only present in src\main\webapp.

tbroyer commented 8 years ago

You have to run mvn package or at a minimum mvn war:exploded before you can run mvn gwt:devmode. See the note at the bottom of https://tbroyer.github.io/gwt-maven-plugin/codeserver.html You can pass -Dgwt.skipCompilation=true to skip the GWT compilation and thus speed up that preparatory step (give that the *.nocache.js will be overwritten by mvn gwt:devmode anyway).

The READMEs need to be updated for the samples.

mtmmtm9 commented 8 years ago

Ok, thanks, that solved the issue. Maybe the plugin could do that automatically ?

tbroyer commented 8 years ago

FWIW, changes to the README files are up for review at https://gwt-review.googlesource.com/16800

Maybe the plugin could do that automatically ?

If it was that easy…

  1. the plugin is designed to work with multi-module projects (similar to those created by my gwt-maven-archetypes), so it'd need to run that war:exploded on a specific subproject; Maven does not make it easy to do that within plugins
  2. I strongly believe you shouldn't use gwt:devmode, but rather run your own servlet container and use gwt:codeserver, where "running your own servlet container" would take care of that (appengine:devserver, jetty:run, tomcat7:run and the like), so I'm not going to invest time adding such a feature to the plugin anyway.