Menu

#1656 Upgrade dependency on outdated Jetty 8 to Jetty 9 (Websocket)

Latest SVN
closed
None
1
2015-01-14
2014-12-20
No

Project that depends on HtmlUnit transitively depends on Jetty Websocket 8.

The problem is that when one project depends on both HtmlUnit
(and thus transitively on Jetty 8) and Jetty 9, there is a collision.

Example: GWT depends on HtmlUnit for its unit test toolchain and
thus on Jetty Websocket 8. In the same time GWT depends on full
blown Jetty server for its codeserver Super Dev Mode (SDM) toolchain.

Problem: Projects that consume GWT (e.g.: Gerrit Code Review) that
depend on latest GWT 2.7 (that still depends on Jetty 8 because of
transitive dependency on Jetty Websocket 8) and in addition on Jetty 9
have classes collision. That's because Jetty 8 and Jetty 9 cannot co-exist.

Q:
Why GWT project cannot upgrade to Jetty 9 and still depends on outdated Jetty 8?

A:
Because GWT depends on HtmlUnit that depends on outdated Jetty 8

Q: Why projects that consume GWT would like to use Jetty 9 internally and not
just use outdated Jetty 8?

A:
Because Jetty 8 is outdated.

Q:
What is the workaround?
There are only ugly hacks out there atm:

Hack #1

Given project "foo" that depends on both GWT 2.7 and on Jetty 9:

foo => GWT => HtmlUnit => Jetty Websocket 8
|         |
|         Jetty 8
|
Jetty 9

Outdated Jetty 8 in GWT is only needed to run codeserver proces (needed for SDM).

The idea in this hack is to isolate that process from actual process running Jetty 9.

Big disadvantage: two separate processes are needed to make that work.
Hack #2 solves this problem by merging those two processes in one:

Hack #2

  1. Strip shiped Jetty 8 from GWT dev JAR
  2. Add Jetty 9 instead
  3. Adjust GWT internal WebServer.java file to run against Jetty 9

All those problems can be avoided when HtmlUnit could upgrade its Websocket
dependency to Jetty 9.

See also this discussion n GWT contrib ML: [1].

[1] https://groups.google.com/d/topic/google-web-toolkit-contributors/Dfld00oBJW8/discussion

Discussion

  • David Ostrovsky

    David Ostrovsky - 2014-12-21

    Patch attached.

     

    Last edit: David Ostrovsky 2014-12-21
  • Ahmed Ashour

    Ahmed Ashour - 2014-12-23
    • assigned_to: Ahmed Ashour
     
  • RBRi

    RBRi - 2014-12-23

    David, many thanks for the patch. Jetty 9 requires java 7, as far as i know. Because we still have no java7 on our build machine available, our long planned migration to java7 is blocked at the moment. Hopefully we can solve this soon.

     
  • Ahmed Ashour

    Ahmed Ashour - 2015-01-14
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB