问题
I have two questions:
1. Which Jetty version is used by GWT 2.5.1 in dev-mode?
2. Is there a way to change this version?
回答1:
- 6.1.11 (source: https://gwt.googlesource.com/gwt/+/2.5.1/dev/build.xml)
Note that 2.6 and 2.7 use Jetty 8.1.12.v20130726, and 2.8 uses Jetty 9.2.14.v20151106 - Yes, you can implement a ServletContainerLauncher that starts another version of Jetty. Beware of classpath conflicts though! (but I suppose you'll want to use a recent version and the new versions use
org.eclipse.jetty
rather thanorg.mortbay.jetty
as a root package so there shouldn't be any problem (with the old GWT pre-2.6).
FYI, gwt-dev will be split into several JARs in the next version of GWT (or maybe the one after that) and the dependency on Jetty will be moved to an optional JAR, and will possibly be updated as well. (note though that GWTTestCase also depends on Jetty)
EDIT: this finally happens with GWT 2.8, but Jetty is needed for SDM (CodeServer
) and Jetty has a bad track of backwards compatibility.
来源:https://stackoverflow.com/questions/17592108/gwt-jetty-version-in-dev-mode