Search code examples
javajarjettyjetty-9http2

jetty HTTP2Client jar missing


I've downloaded the latest (9.3.7.v20160115) Jetty from here.

Accourding to the documentation, the HTTP/2 has 4 sub-projects, one is http2-client.

I'm unable to find it. The only jars I have in http2 are:

  • http2-common-9.3.7.v20160115.jar
  • http2-hpack-9.3.7.v20160115.jar
  • http2-server-9.3.7.v20160115.jar

What has happened with http2-client?


Solution

  • All Jetty components are available on Global Maven Repository system.

    Here's the components belonging to org.eclipse.jetty.http2, along with the http2-client you are looking for.

    Since there is nothing in the jetty-distribution that uses the http2-client (and associated alpn-client), and there is no way to use the http2-client through the server / webapp classloader isolation, its highly unlikely that it will show up on the jetty-distribution.

    If you intend to use it standalone (not from a java web/app server), then use the components from maven central.

    If your intention is to use it from a jetty server instance, you'll want to copy the components into place in your WEB-INF/lib directory for your webapp (be aware that you should have your http2-client and jetty server versions in lockstep if you attempt to do this, as you can potentially share many utility/io/http classes from jetty server classloader itself)