+1 to removing JettyLauncherbut not Jetty entirely, it would still be required by "codeserver" in "DevMode".
+1 to adopting and maintaining official implementations (disclaimer: knowing that I won't maintain them myself, but) not having at least "some" official implementations would likely be a show stopper; maybe only have a couple official implementations though, with limited scope (like nowaday's JettyLauncher), and leave the others as "third parties"? (also makes it easier to "abandon" some when/if hardly anybody uses them and/or they become a burden to maintain; and provide more guarantees for the "official" ones?)
Relatively solved indeed, that's what I expected, which worked for my PoC modules.The first problem I encountered was loading some application classes through the DevMode launcher's classloader and some others from the application classloader.for example: SpringFramework interfaces loaded from the isolated DevMode classloader but concrete implementation classes loaded from the application classloader, which produced class loading errors.I had to start excluding dependencies from the Jetty container's WEB-INF/lib folder using a specific technique so that the classes would be all loaded from the classloader of DevMode instead, but even that wasn't enough.The problem got worse when I tried to make use of even more dynamic frameworks like SpringSecurity, being unable to prepare the underlying component chains, which is where I stopped.Overall, it seems that even though the DevMode classloader is isolated, a lot of trickery may still be required.
Hi everyone,
Recently, I’ve been working on migrating our GWT application (Java 17 – GWT 2.12.2) to run on Jetty 11.0.25, and I followed the approach described by @elias using the Cargo API to launch the app in DevMode.
Here’s what I’ve done so far:
I'm launching the app on eclipse IDE with: -war my_war_path -server net.upperlimit.tools.GWT.DevMode.server.impl.Cargo.installed.Jetty11.jakarta.DevModeServerLauncher
Since debugging didn’t work out-of-the-box from Eclipse, I tried attaching a Remote Java Application configuration.
To support that, I overrode the DevModeServerLauncher to expose JDWP arguments via VM options, with: -DdebuggerPort=5007 -DdebuggerSuspend=n
This allows me to debug server-side code from Eclipse, but client-side debugging (GWT) remains tricky, and Super Dev Mode / hot code reloading doesn't seems to work properly.
So far this setup (based on an installed Jetty instance) feels a bit cumbersome and disconnected from the Eclipse workflow. It seems to spawn a separate JVM, which complicates debugging and classpath management.
I’m wondering if there’s a recommended way to launch the app using the "embedded Jetty" approach, ideally within Eclipse, to better match developer expectations — single JVM, smoother debugging, and working hot reload.
Any advice, working examples, or gotchas would be greatly appreciated!
Thanks a lot in advance!