Re: Jetty8-continuations depends on jetty6-util???
Hi Thomas,
On 25.10.2012 13:39, Thomas Koch wrote:
I'm setting up Gerrit in Eclipse using Dependencies from Debian. Now I found,
that apparently the jetty8 continuations jar uses a class
org.mortbay.log.Logger available only in jetty6 util. The Jetty8-continuations
pom also references jetty6-util as a provided dependency, see
/usr/share/maven-repo/org/eclipse/jetty/jetty-continuation/debian/jetty-
continuation-debian.pom:
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-util</artifactId>
<version>6.x</version>
<scope>provided</scope>
</dependency>
I'm puzzled? Does that mean that libjetty8 should actually depend on
libjetty6? The upstream pom contains the same dependency.
I don't think the package dependency is required, documentation in Jetty6Continuation class says:
* This implementation of Continuation is used by {@link ContinuationSupport}
* when it detects that the application is deployed in a jetty-6 server.
and, as written, ContinuationSupport checks inside which Jetty version it is running and loads the class only in Jetty 6:
Class<?> jetty6ContinuationClass = ContinuationSupport.class.getClassLoader().loadClass("org.mortbay.util.ajax.Continuation");
boolean jetty6=jetty6ContinuationClass!=null;
if (jetty6)
{
Class<? extends Continuation> j6c =
ContinuationSupport.class.getClassLoader().loadClass("org.eclipse.jetty.continuation.Jetty6Continuation").asSubclass(Continuation.class);
j6cc=j6c.getConstructor(ServletRequest.class, jetty6ContinuationClass);
jetty6Support=true;
}
Such situation will never happen when Jetty 8 is installed from Debian packages.
We only have build dependency on libjetty-java so that Jetty6Continuation is compiled and jetty8-continuation.jar will work in case someone
copies it from Debian into some jetty6 instance.
Nevertheless, if we at some point decide to remove jetty6 from our repository, it should be safe to disable Jetty6Continuation completely.
Regards,
Jakub
Reply to: