How can i upgrade the GWT plugin to use a newer version of Jetty?
Hi, GWT plugin user here. Quick summary:
GWT 2.9.0 has a dependency on Jetty 9.2.14, and it supports Java 7 still. This causes problems with ASM, because Jetty uses it to parse jar files for java version support or something (unclear on the exact details). Basically, if a library (like junit-vintage-5) doesn't contain a module-info.class, jetty won't run. (SO thread with more details https://stackoverflow.com/questions/67177362/how-can-i-work-around-this-asm-issue-with-junit-5?noredirect=1#comment118769414_67177362
This can apparently be worked around by using Jetty 9.4+ that seems to have worked out the scanning somehow.
---
Now the problem is that i use the gwt plugin in intellij to launch devmode, and i cannot figure out how the version of jetty is set. There's a long thread on the gwt github project on various people having worked around this in Eclipse and build files, but i was not able do decipher that into how i can fix it to run inside intellij.
Github GWT project issue thread: https://github.com/gwtproject/gwt/issues/9606
So, my question is inevitably: Is there a way for me to configure/update the GWT plugin to use jetty 9.4+ instead of the "default version" (which i assume is from the gwt-dev dependency?).
Help would be *much* appreciated.
请先登录再写评论。
What run configuration do you use in IDE?
You can specify -noserver option in 'Dev Mode parameters' field of GWT Run configuration to disable Jetty instance embedded in GWT. Then launch Jetty server using a separate Jetty run configuration using the standalone Jetty server and start GWT configuration.
Hey there thanks for quick response!
Right they talked about that in the thread too, but it's quite convenient with the gwt plugin - just one click and both the gwt and my server-side war with activemq queues, quartz etc. is up and running at once...
OK, please allow me some noob follow-up questions:
I've actually only used the gwt-plugin to run inside intellij. The other way is to just build my war with maven and start up tomcat on my machine from the command line.
The gwt plugin just uses it's jetty dependency automatically (i think), so i haven't had to bother with jetty config. If i want to run my war module inside intellij, do i have to install jetty on my machine, and figure out some context-config for it, or does it come bundled with intellij too? If not, what does the jetty plugin do? Sorry if it's obvious.
The Jetty, bundled with IntelliJ IDEA Ultimate plugin, provides the Jetty run debug configuration to start, deploy and debug applications on Jetty server. You will need to install the Jetty server and add it into the IDE.
Right, and there's no way to update the jetty used in the actual gwt-plugin i take it then. Would have been great to be able to just point it to another jar somehow.