Tuesday, October 31, 2017

Re: Migrating from GWT 2.5.1 to 2.8.2 - Problem with Super dev mode

Hi Thomas,

Many thanks for your time and answer! I was indeed playing with the legacy plugin ... :)  Things work much better now. The super dev mode is really great by the way.

I used your plugin and revamped slightly the client project (moved my main mymodule.gwt.xml to /src/main/java/module.gwt.xml and all my sources to /src/main/java). I'm then running code server with launcherDir arg pointing to my php root.

As for the downside of overriding nocache.js, I think the ideal process of deploying is compiling within a CI chain so it won't matter at all :)

Many thanks again,


Le mardi 31 octobre 2017 11:41:31 UTC+1, Thomas Broyer a écrit :

On Tuesday, October 31, 2017 at 10:31:39 AM UTC+1, Martones wrote:
Hey guys,

I'm trying to migrate my app which looks like this : 
GWT 2.5.1 front, PHP back, no maven -> GWT 2.8.2 front, PHP back, maven with gwt-maven-plugin.

I manage to mvn gwt:compile and mvn gwt:run-codeserver.

I actually think I'm confused about how the SDM runs now in 2.7+ but here is what I was thinking : 
  1. Run compile (optional ? ) via mvn gwt:compile
  2. Run code server via mvn gwt:run-codeserver
  3. Save the bookmarklet and compile via the popup on my gwt page 
  4. re-compile on every code change manually

In 2.7+, you can do:
  1. Run code server with -launchDir pointing to the directory served by your server
(there's no other step, code server will automatically compile/recompile on page load)
With Mojo's plugin (you did notice the maintainer now "strongly encourage[s you] to use the new [plugin]" though, right? see https://gwt-maven-plugin.github.io/gwt-maven-plugin/ ), that's <launcherDir> and <webappDirectory>.

The only downside is that code server when run this way will overwrite the mymodule.nocache.js, so make sure you recompile the app before packaging/deploying (gwt-maven-plugin staleness check might be confused, so "mvn clean", or force recompilation with -Dgwt.compiler.force)

The third point is the one that isn't working anymore (was ok in 2.5.1). In the popup I have :

mymodule : off This module doesn't have Super Dev Mode enabled.

Here is my module file: removed all the SDM lines that I understood are now useless, doesn't work anyway if I keep them :)

<module rename-to='mymodule'>
<!-- Inherits -->
<!-- ... -->

<!--  Entry point -->
<entry-point class="com.mycompany.mymodule.client.mymodule"></entry-point>

<!-- paths -->
<source path='client' />
<source path='shared' />

<!--  SDM  -->
<!-- <add-linker name="xsiframe"/>
  <set-configuration-property name="devModeRedirectEnabled" value="true"/>
 <set-property name="compiler.useSourceMaps" value="true"/> -->

<set-configuration-property name="CssResource.conversionMode"    value="strict" />

I'm serving my php page from a docker container on my localhost (so no HTTPS).

Any help is much appreciated :)


You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment