[uima-addons] 04/05: Transition to Jetty 9

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Fri Oct 21 19:41:32 UTC 2016


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository uima-addons.

commit eb21c0f1c8a7fbca364716c5117a3c329beaaf97
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Fri Oct 21 21:29:49 2016 +0200

    Transition to Jetty 9
---
 debian/changelog                         |  2 +-
 debian/control                           |  2 +-
 debian/maven.rules                       |  2 +-
 debian/patches/jetty-compatibility.patch | 27 +++++++++++++++++++++++++--
 4 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index c6d1eab..c733b21 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,7 @@
 uima-addons (2.3.1-6) UNRELEASED; urgency=medium
 
   * Team upload.
-  * Transition to the Servlet API 3.1
+  * Transition to Jetty 9 and Servlet API 3.1
   * Removed the -java-doc package
   * Switch to debhelper level 10
 
diff --git a/debian/control b/debian/control
index 8f43839..3ef7a8e 100644
--- a/debian/control
+++ b/debian/control
@@ -11,7 +11,7 @@ Build-Depends-Indep: ant,
                      libcommons-logging-java,
                      libhttpclient-java,
                      libjavacc-maven-plugin-java,
-                     libjetty8-java,
+                     libjetty9-java,
                      liblog4j1.2-java,
                      libmaven-antrun-plugin-java,
                      libmaven-bundle-plugin-java,
diff --git a/debian/maven.rules b/debian/maven.rules
index 308af03..98de4d0 100644
--- a/debian/maven.rules
+++ b/debian/maven.rules
@@ -21,7 +21,7 @@ log4j log4j jar s/1\.2\..*/1.2.x/ * *
 junit junit jar s/.*/4\.x/ * *
 commons-logging s/commons-logging-api/commons-logging/ * s/.*/debian/ * *
 s/ant/org.apache.ant/ * * s/.*/debian/ * *
-s/org.mortbay.jetty/org.eclipse.jetty/ s/jetty/jetty-servlet/ * s/.*/debian/ * *
+s/org.mortbay.jetty/org.eclipse.jetty/ s/jetty/jetty-servlet/ * s/.*/9.x/ * *
 javax.servlet s/servlet-api/javax.servlet-api/ jar s/.*/3.1/ * *
 
 org.apache.uima BSFAnnotator jar s/.*/debian/ * *
diff --git a/debian/patches/jetty-compatibility.patch b/debian/patches/jetty-compatibility.patch
index 67ac6dd..df88627 100644
--- a/debian/patches/jetty-compatibility.patch
+++ b/debian/patches/jetty-compatibility.patch
@@ -1,4 +1,4 @@
-Description: Port the Jetty 6 code to Jetty 8
+Description: Port the Jetty 6 code to Jetty 9
 Author: Emmanuel Bourg <ebourg at apache.org>
 Forwarded: no
 --- a/SimpleServer/src/main/java/org/apache/uima/simpleserver/util/JettyUtils.java
@@ -14,12 +14,21 @@ Forwarded: no
 -import org.mortbay.jetty.servlet.ServletHolder;
 +import org.eclipse.jetty.server.Connector;
 +import org.eclipse.jetty.server.Server;
-+import org.eclipse.jetty.server.nio.SelectChannelConnector;
++import org.eclipse.jetty.server.ServerConnector;
 +import org.eclipse.jetty.servlet.ServletHandler;
 +import org.eclipse.jetty.servlet.ServletHolder;
  
  public class JettyUtils {
  
+@@ -103,7 +103,7 @@
+ 
+   public static Server createServer() {
+     Server server = new Server();
+-    Connector connector = new SelectChannelConnector();
++    ServerConnector connector = new ServerConnector(server);
+     final int port = findFreePort();
+     if (port <= 0) {
+       return null;
 @@ -120,7 +120,7 @@
      return server;
    }
@@ -29,3 +38,17 @@ Forwarded: no
      ((ServletHandler) server.getHandler()).addServletWithMapping(servlet, pathSpec);
    }
  
+@@ -130,11 +130,11 @@
+   }
+ 
+   public static String getHost(Server server) {
+-    return server.getConnectors()[0].getHost();
++    return ((org.eclipse.jetty.server.NetworkConnector) server.getConnectors()[0]).getHost();
+   }
+ 
+   public static int getPort(Server server) {
+-    return server.getConnectors()[0].getPort();
++    return ((org.eclipse.jetty.server.NetworkConnector) server.getConnectors()[0]).getPort();
+   }
+ 
+   private static final int findFreePort() {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/uima-addons.git



More information about the pkg-java-commits mailing list