You should definitely move to the tbroyer maven plugin if you use maven.

In general the CodeServer class has a parameter named "-launcherDir". It 
should point to your exploded war directory or, if not, the content of 
configured folder should be included in the war file you build for 
development. CodeServer produces a special *.nocache.js file which 
automatically triggers recompilation in the browser whenever you reload the 
page.

Other than that the workflow is pretty much what you have described:
- Launch SuperDevMode
- Launch a servlet container, e.g. Jetty, Tomcat, whatever (local 
installation, docker container, ...)
- Use an exploded war directory or a package war file which includes the 
output of SuperDevMode
- If you make code changes you have to either redeploy your app, reload the 
page to trigger a GWT recompile or do both.

Personally I use Gradle to launch SuperDevMode and to build the development 
war file. Then I use exactly the same stack as in production via docker 
images to deploy and serve the war file. This minimizes differences between 
development and production and thus minimizes surprises. 

-- J.

tbb schrieb am Freitag, 24. Januar 2025 um 00:39:14 UTC+1:

> Thanks @tekkyru and and @Craig. I'm using maven, but with the old mojo 
> plugin, not the tbroyer one. I'll check out what the tbroyer one does. My 
> plan is to move to that one anyway.
>
> On Thursday, January 23, 2025 at 3:34:24 PM UTC+8 Craig Mitchell wrote:
>
>> I switched to use Maven.
>>
>> I created a template from  
>> https://github.com/NaluKit/gwt-maven-springboot-archetype  and merged 
>> that framework to my project.
>>
>> Then for running dev, it's just 2 steps: 
>> https://github.com/NaluKit/gwt-maven-springboot-archetype?tab=readme-ov-file#start-the-development-mode
>>
>> On Thursday, 23 January 2025 at 2:38:42 pm UTC+11 tekkyru wrote:
>>
>>> Hi Thomas
>>>
>>> In my development cycle I had to get rid of Jetty and GWT Eclipse plugin 
>>> (I use Eclipse) because of "JAR hell" caused by different tools running in 
>>> same classloader (Eclipse GWT plugin, GWT code server, my Spring web app, 
>>> Jetty)
>>> To do that I have created a Gradle task (I use Gradle) running GWT dev 
>>> server targeting an Eclipse WTP plugin folder (for Tomcat in my case). It 
>>> took time to configure separate classpaths but finally it worked.
>>> Then I run my web app the standard way as Eclipse/Tomcat server of my 
>>> choice, run the Gradle GWT code server task (as Eclipse external tool) and 
>>> use my webapp as if it was deployed on production - just open my index page 
>>> and the GWT code server  (in SuperDev mode) does the magic of compiling on 
>>> the fly.
>>> GWT code server points to working folder of the Eclipse WTP plugin 
>>> synched with my sources. This way I don't need to compile anything 
>>> explicitly, I just shortly see the GWT compilation page before my main app 
>>> page is loaded.
>>>
>>> On Thursday, January 23, 2025 at 1:30:13 AM UTC+1 tbb wrote:
>>>
>>>> Hi all,
>>>>
>>>> I've been a long-time user of GWT, and I'm working on a fairly large 
>>>> project based on GWT 2.8.2. 
>>>>
>>>> Our dev workflow is using GWT's DevMode with the built-in Jetty server. 
>>>> We're about to upgrade our stack for newer GWT and Java versions. As 
>>>> mentioned in this group many times, DevMode is no longer recommended and 
>>>> doesn't work for our setup in newer GWT/JDK combinations. So I want/need 
>>>> to 
>>>> use a webserver + codeserver. I've now got Tomcat/Cargo with Codeserver 
>>>> working, but I'm not 100% on the typical dev cycle.
>>>>
>>>> As I understand it, it would be:
>>>> - Build the (exploded) WAR, which includes a GWT compile (1 permutation 
>>>> for dev). I've read that Codeserver only works with a compiled GWT app. 
>>>> - Run Cargo/Tomcat 
>>>> - Run GWT Codeserver
>>>> - In the browser, click on bookmarklet to compile
>>>> - Refresh the page for GWT compile
>>>>
>>>> It's more involved than previously just starting gwt:debug, so maybe 
>>>> I'm missing some best practice?
>>>>
>>>> What's your dev workflow?
>>>>
>>>> Cheers,
>>>> Thomas
>>>>
>>>

-- 
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/google-web-toolkit/f01c4e58-7542-4210-8c22-9962d37051d2n%40googlegroups.com.

Reply via email to