Pregunta

Follow steps in this post, I use gwt-maven-plugin 2.6.0, when I run mvn gwt:run-codeserver it compiled successfully:

[INFO] binding: user.agent=safari
[INFO] Compiling module com.example.myModule
[INFO]    Validating units:
[INFO]       Ignored 3 units with compilation errors in first pass.
[INFO] Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
[INFO]    ...
[INFO]    Compiling 1 permutation
[INFO]       Compiling permutation 0...
[INFO]       Source Maps Enabled
[INFO]    Compile of permutations succeeded
[INFO] Linking into C:\Users\admin\AppData\Local\Temp\gwt-codeserver-5664784549647002986.tmp\com.example.myModule\compile-4\war\myModule;
 Writing extras to C:\Users\admin\AppData\Local\Temp\gwt-codeserver-5664784549647002986.tmp\com.example.myModule\compile-4\extras\myModule
[INFO]    Link succeeded
[INFO]    Compilation succeeded -- 3.401s
[INFO] Compile completed in 3496 ms

Then I started the dev server using mvn install gwt:run, made changes on my source file and click the Dev Mode On bookmark. After compiling the changes cannot reflect to UI: the UI always show old values.

Any ideas on this problem?

¿Fue útil?

Solución

There's a bug in gwt-maven-plugin up to (including) 2.6.0; you have to run mvn process-classes gwt:run-codeserver instead of just mvn gwt:run-codeserver. This is fixed in 2.6.1.

Also, if you change anything in src/main/resources, you'll have to run mvn process-resources to make your changes available to Super Dev Mode (this is because you might use resource filtering, so Super Dev Mode doesn't directly look at src/main/resources).

Similarly, if you use plugins that generate resources or Java sources, you'll have to run them manually (e.g. mvn generate-sources or mvn generate-resources; or just use the same mvn process-resources as above, which will do everything at once). This will be necessary for example if you use gwt:generateAsync and change your GWT-RPC interface (note that you'll also have to redeploy your server-side code).


Note: I just updated my answer in the linked post for GWT 2.6.0, and added a note about GWT-RPC, and the gwt-maven-plugin bug.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top