msrb pushed to jenkins-winstone (master). "Port to Jetty 9"

notifications at fedoraproject.org notifications at fedoraproject.org
Thu Apr 23 10:10:09 UTC 2015


>From 11fcc12e075cf05716927720c66230b921b2445f Mon Sep 17 00:00:00 2001
From: Michal Srb <msrb at redhat.com>
Date: Thu, 23 Apr 2015 12:04:04 +0200
Subject: Port to Jetty 9


diff --git a/0001-Port-to-Jetty-9.patch b/0001-Port-to-Jetty-9.patch
new file mode 100644
index 0000000..53c8989
--- /dev/null
+++ b/0001-Port-to-Jetty-9.patch
@@ -0,0 +1,513 @@
+From 02275c8cc57f1ff387e1deb123713f45a8dc1896 Mon Sep 17 00:00:00 2001
+From: Michal Srb <msrb at redhat.com>
+Date: Thu, 23 Apr 2015 11:58:29 +0200
+Subject: [PATCH] Port to Jetty 9
+
+---
+ pom.xml                                            |  16 +-
+ src/java/winstone/Ajp13ConnectorFactory.java       |  42 ------
+ src/java/winstone/HttpConnectorFactory.java        |  29 ++--
+ src/java/winstone/HttpsConnectorFactory.java       |  65 ++++-----
+ src/java/winstone/Launcher.java                    |   9 +-
+ .../winstone/accesslog/SimpleAccessLogger.java     |   7 +-
+ src/test/winstone/Ajp13ConnectorFactoryTest.java   | 161 ---------------------
+ 7 files changed, 51 insertions(+), 278 deletions(-)
+ delete mode 100644 src/java/winstone/Ajp13ConnectorFactory.java
+ delete mode 100644 src/test/winstone/Ajp13ConnectorFactoryTest.java
+
+diff --git a/pom.xml b/pom.xml
+index b1ae6a7..812f33b 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -221,25 +221,13 @@
+     <dependency>
+       <groupId>org.eclipse.jetty</groupId>
+       <artifactId>jetty-servlet</artifactId>
+-      <version>8.1.13.v20130916</version>
++      <version>9.3.0.M2</version>
+     </dependency>
+ 
+     <dependency>
+       <groupId>org.eclipse.jetty</groupId>
+       <artifactId>jetty-webapp</artifactId>
+-      <version>8.1.13.v20130916</version>
+-    </dependency>
+-
+-    <dependency>
+-      <groupId>org.eclipse.jetty</groupId>
+-      <artifactId>jetty-ajp</artifactId>
+-      <version>8.1.13.v20130916</version>
+-    </dependency>
+-
+-    <dependency>
+-      <groupId>org.eclipse.jetty.spdy</groupId>
+-      <artifactId>spdy-jetty-http</artifactId>
+-      <version>8.1.13.v20130916</version>
++      <version>9.3.0.M2</version>
+     </dependency>
+ 
+     <dependency>
+diff --git a/src/java/winstone/Ajp13ConnectorFactory.java b/src/java/winstone/Ajp13ConnectorFactory.java
+deleted file mode 100644
+index 071c2ad..0000000
+--- a/src/java/winstone/Ajp13ConnectorFactory.java
++++ /dev/null
+@@ -1,42 +0,0 @@
+-/*
+- * Copyright 2003-2006 Rick Knowles <winstone-devel at lists sourceforge net>
+- * Distributed under the terms of either:
+- * - the common development and distribution license (CDDL), v1.0; or
+- * - the GNU Lesser General Public License, v2.1 or later
+- */
+-package winstone;
+-
+-import org.eclipse.jetty.ajp.Ajp13SocketConnector;
+-import org.eclipse.jetty.server.Server;
+-import winstone.ConnectorFactory;
+-import winstone.cmdline.Option;
+-
+-import java.io.IOException;
+-import java.util.Map;
+-
+-/**
+- * Implements the main listener daemon thread. This is the class that gets
+- * launched by the command line, and owns the server socket, etc.
+- * 
+- * @author mailto: <a href="rick_knowles at hotmail.com">Rick Knowles</a>
+- * @version $Id: Ajp13ConnectorFactory.java,v 1.12 2006/03/24 17:24:22 rickknowles Exp $
+- */
+-public class Ajp13ConnectorFactory implements ConnectorFactory {
+-    public boolean start(Map args, Server server) throws IOException {
+-        int listenPort = Option.AJP13_PORT.get(args);
+-        String listenAddress = Option.AJP13_LISTEN_ADDRESS.get(args);
+-
+-        if (listenPort < 0) {
+-            return false;
+-        }
+-
+-        Ajp13SocketConnector connector = new Ajp13SocketConnector();
+-        connector.setPort(listenPort);
+-        connector.setHost(listenAddress);
+-        connector.setRequestHeaderSize(Option.REQUEST_HEADER_SIZE.get(args));
+-        connector.setRequestBufferSize(Option.REQUEST_BUFFER_SIZE.get(args));
+-
+-        server.addConnector(connector);
+-        return true;
+-    }
+-}
+diff --git a/src/java/winstone/HttpConnectorFactory.java b/src/java/winstone/HttpConnectorFactory.java
+index 0affc0f..b0e6503 100644
+--- a/src/java/winstone/HttpConnectorFactory.java
++++ b/src/java/winstone/HttpConnectorFactory.java
+@@ -6,13 +6,16 @@
+  */
+ package winstone;
+ 
+-import org.eclipse.jetty.server.Server;
+-import org.eclipse.jetty.server.nio.SelectChannelConnector;
+-import winstone.cmdline.Option;
+-
+ import java.io.IOException;
+ import java.util.Map;
+ 
++import org.eclipse.jetty.server.HttpConfiguration;
++import org.eclipse.jetty.server.HttpConnectionFactory;
++import org.eclipse.jetty.server.Server;
++import org.eclipse.jetty.server.ServerConnector;
++
++import winstone.cmdline.Option;
++
+ /**
+  * Implements the main listener daemon thread. This is the class that gets
+  * launched by the command line, and owns the server socket, etc. Note that this
+@@ -31,13 +34,13 @@ public class HttpConnectorFactory implements ConnectorFactory {
+         if (listenPort < 0) {
+             return false;
+         } else {
+-            SelectChannelConnector connector = createConnector(server);
++            ServerConnector connector = createConnector(args, server);
+             connector.setPort(listenPort);
+             connector.setHost(listenAddress);
+-            connector.setMaxIdleTime(keepAliveTimeout);
+-            connector.setForwarded(true);
+-            connector.setRequestHeaderSize(Option.REQUEST_HEADER_SIZE.get(args));
+-            connector.setRequestBufferSize(Option.REQUEST_BUFFER_SIZE.get(args));
++            connector.setIdleTimeout(keepAliveTimeout);
++//            connector.setForwarded(true);
++//            connector.setRequestHeaderSize(Option.REQUEST_HEADER_SIZE.get(args));
++//            connector.setRequestBufferSize(Option.REQUEST_BUFFER_SIZE.get(args));
+ 
+             server.addConnector(connector);
+             return true;
+@@ -48,6 +51,10 @@ public class HttpConnectorFactory implements ConnectorFactory {
+      * Gets a server socket - this is mostly for the purpose of allowing an
+      * override in the SSL connector.
+      */
+-    protected SelectChannelConnector createConnector(Server server) {
+-        return new SelectChannelConnector();
++    protected ServerConnector createConnector(Map args, Server server) {
++        HttpConfiguration httpConfig = new HttpConfiguration();
++        httpConfig.setRequestHeaderSize(Option.REQUEST_HEADER_SIZE.get(args));
++        httpConfig.setOutputBufferSize(Option.REQUEST_BUFFER_SIZE.get(args));
++
++        return new ServerConnector(server, new HttpConnectionFactory(httpConfig));
+     }}
+diff --git a/src/java/winstone/HttpsConnectorFactory.java b/src/java/winstone/HttpsConnectorFactory.java
+index cf92049..c4c6f00 100644
+--- a/src/java/winstone/HttpsConnectorFactory.java
++++ b/src/java/winstone/HttpsConnectorFactory.java
+@@ -6,20 +6,6 @@
+  */
+ package winstone;
+ 
+-import org.eclipse.jetty.server.Server;
+-import org.eclipse.jetty.server.nio.SelectChannelConnector;
+-import org.eclipse.jetty.server.ssl.SslSelectChannelConnector;
+-import org.eclipse.jetty.util.B64Code;
+-import org.eclipse.jetty.util.ssl.SslContextFactory;
+-
+-import sun.security.util.DerInputStream;
+-import sun.security.util.DerValue;
+-import sun.security.x509.X500Name;
+-import winstone.cmdline.Option;
+-
+-import javax.net.ssl.KeyManagerFactory;
+-import javax.net.ssl.SSLContext;
+-
+ import java.io.BufferedReader;
+ import java.io.ByteArrayOutputStream;
+ import java.io.File;
+@@ -28,7 +14,6 @@ import java.io.FileReader;
+ import java.io.IOException;
+ import java.io.Reader;
+ import java.lang.reflect.Constructor;
+-import java.lang.reflect.InvocationTargetException;
+ import java.lang.reflect.Method;
+ import java.math.BigInteger;
+ import java.security.GeneralSecurityException;
+@@ -44,6 +29,20 @@ import java.util.Date;
+ import java.util.Enumeration;
+ import java.util.Map;
+ 
++import javax.net.ssl.KeyManagerFactory;
++
++import org.eclipse.jetty.server.HttpConfiguration;
++import org.eclipse.jetty.server.HttpConnectionFactory;
++import org.eclipse.jetty.server.Server;
++import org.eclipse.jetty.server.ServerConnector;
++import org.eclipse.jetty.util.B64Code;
++import org.eclipse.jetty.util.ssl.SslContextFactory;
++
++import sun.security.util.DerInputStream;
++import sun.security.util.DerValue;
++import sun.security.x509.X500Name;
++import winstone.cmdline.Option;
++
+ /**
+  * Implements the main listener daemon thread. This is the class that gets
+  * launched by the command line, and owns the server socket, etc.
+@@ -129,37 +128,26 @@ public class HttpsConnectorFactory implements ConnectorFactory {
+             throw (IOException)new IOException("Failed to handle keys").initCause(e);
+         }
+ 
+-        SelectChannelConnector connector = createConnector(args);
++        ServerConnector connector = createConnector(args, server);
+         connector.setPort(listenPort);
+         connector.setHost(listenAddress);
+-        connector.setForwarded(true);
+-        connector.setMaxIdleTime(keepAliveTimeout);
+-        connector.setRequestHeaderSize(Option.REQUEST_HEADER_SIZE.get(args));
+-        connector.setRequestBufferSize(Option.REQUEST_BUFFER_SIZE.get(args));
++//        connector.setForwarded(true);
++        connector.setIdleTimeout(keepAliveTimeout);
++//        connector.setRequestHeaderSize(Option.REQUEST_HEADER_SIZE.get(args));
++//        connector.setRequestBufferSize(Option.REQUEST_BUFFER_SIZE.get(args));
+         server.addConnector(connector);
+ 
+         return true;
+     }
+ 
+-    private SelectChannelConnector createConnector(Map args) {
++    private ServerConnector createConnector(Map args, Server server) {
++        HttpConfiguration httpsConfig = new HttpConfiguration();
++        httpsConfig.setRequestHeaderSize(Option.REQUEST_HEADER_SIZE.get(args));
++        httpsConfig.setOutputBufferSize(Option.REQUEST_BUFFER_SIZE.get(args));
++
+         SslContextFactory sslcf = getSSLContext(args);
+-        if (Option.HTTPS_SPDY.get(args)) {// based on http://wiki.eclipse.org/Jetty/Feature/SPDY
+-            try {
+-                sslcf.setIncludeProtocols("TLSv1");
+-                return (SelectChannelConnector)Class.forName("org.eclipse.jetty.spdy.http.HTTPSPDYServerConnector")
+-                        .getConstructor(SslContextFactory.class)
+-                        .newInstance(sslcf);
+-            } catch (NoClassDefFoundError e) {
+-                if (e.getMessage().contains("org/eclipse/jetty/npn")) {
+-                    // a typically error is to forget to run NPN
+-                    throw new WinstoneException(SSL_RESOURCES.getString("HttpsListener.MissingNPN"), e);
+-                }
+-                throw e;
+-            } catch (Exception e) {
+-                throw new Error("Failed to enable SPDY connector",e);
+-            }
+-        } else
+-            return new SslSelectChannelConnector(sslcf);
++
++        return new ServerConnector(server, sslcf, new HttpConnectionFactory(httpsConfig));
+     }
+ 
+     private static PrivateKey readPEMRSAPrivateKey(Reader reader) throws IOException, GeneralSecurityException {
+@@ -182,7 +170,6 @@ public class HttpsConnectorFactory implements ConnectorFactory {
+             reader.close();
+         }
+ 
+-
+         DerInputStream dis = new DerInputStream(baos.toByteArray());
+         DerValue[] seq = dis.getSequence(0);
+ 
+diff --git a/src/java/winstone/Launcher.java b/src/java/winstone/Launcher.java
+index aacce18..ef4b5f2 100644
+--- a/src/java/winstone/Launcher.java
++++ b/src/java/winstone/Launcher.java
+@@ -48,7 +48,6 @@ public class Launcher implements Runnable {
+     
+     static final String HTTP_LISTENER_CLASS = "winstone.HttpConnectorFactory";
+     static final String HTTPS_LISTENER_CLASS = "winstone.HttpsConnectorFactory";
+-    static final String AJP_LISTENER_CLASS = "winstone.Ajp13ConnectorFactory";
+ 
+     public static final byte SHUTDOWN_TYPE = (byte) '0';
+     public static final byte RELOAD_TYPE = (byte) '4';
+@@ -62,7 +61,7 @@ public class Launcher implements Runnable {
+     private ExecutorService threadPool;
+     private Map args;
+ 
+-    public final Server server = new Server();
++    public Server server = new Server();
+     
+     /**
+      * Constructor - initialises the web app, object pools, control port and the
+@@ -133,6 +132,7 @@ public class Launcher implements Runnable {
+                     commonLibCLPaths.toString());
+ 
+             this.threadPool = createThreadPool();
++            this.server = new Server(new ExecutorThreadPool(threadPool));
+ 
+             int maxParameterCount = Option.MAX_PARAM_COUNT.get(args);
+             if (maxParameterCount>0) {
+@@ -143,13 +143,10 @@ public class Launcher implements Runnable {
+             this.hostGroup = new HostGroup(server, commonLibCL,
+                     commonLibCLPaths.toArray(new File[0]), args);
+ 
+-            // Create connectors (http, https and ajp)
++            // Create connectors (http, https)
+             spawnListener(HTTP_LISTENER_CLASS);
+-            spawnListener(AJP_LISTENER_CLASS);
+             spawnListener(HTTPS_LISTENER_CLASS);
+ 
+-            server.setThreadPool(new ExecutorThreadPool(threadPool));
+-
+             try {
+                 server.start();
+             } catch (Exception e) {
+diff --git a/src/java/winstone/accesslog/SimpleAccessLogger.java b/src/java/winstone/accesslog/SimpleAccessLogger.java
+index fa9100d..a11f88a 100644
+--- a/src/java/winstone/accesslog/SimpleAccessLogger.java
++++ b/src/java/winstone/accesslog/SimpleAccessLogger.java
+@@ -8,7 +8,6 @@ package winstone.accesslog;
+ 
+ import org.eclipse.jetty.server.Request;
+ import org.eclipse.jetty.server.RequestLog;
+-import org.eclipse.jetty.server.Response;
+ import org.eclipse.jetty.util.component.AbstractLifeCycle;
+ import winstone.Logger;
+ import winstone.WinstoneResourceBundle;
+@@ -78,10 +77,8 @@ public class SimpleAccessLogger extends AbstractLifeCycle implements RequestLog
+                 this.fileName, patternType);
+     }
+     
+-    public void log(Request request, Response response) {
++	public void log(Request request, int status, long written) {
+         String uriLine = request.getMethod() + " " + request.getRequestURI() + " " + request.getProtocol();
+-        int status = response.getStatus();
+-        long size = response.getContentCount();
+         String date;
+         synchronized (DF) {
+             date = DF.format(new Date());
+@@ -102,7 +99,7 @@ public class SimpleAccessLogger extends AbstractLifeCycle implements RequestLog
+                 {"###time###", "[" + date + "]"},
+                 {"###uriLine###", uriLine},
+                 {"###status###", "" + status},
+-                {"###size###", "" + size},
++                {"###size###", "" + written},
+                 {"###referer###", nvl(request.getHeader("Referer"))},
+                 {"###userAgent###", nvl(request.getHeader("User-Agent"))}
+         });
+diff --git a/src/test/winstone/Ajp13ConnectorFactoryTest.java b/src/test/winstone/Ajp13ConnectorFactoryTest.java
+deleted file mode 100644
+index 403b478..0000000
+--- a/src/test/winstone/Ajp13ConnectorFactoryTest.java
++++ /dev/null
+@@ -1,161 +0,0 @@
+-/*
+- *  Licensed to the Apache Software Foundation (ASF) under one or more
+- *  contributor license agreements.  See the NOTICE file distributed with
+- *  this work for additional information regarding copyright ownership.
+- *  The ASF licenses this file to You under the Apache License, Version 2.0
+- *  (the "License"); you may not use this file except in compliance with
+- *  the License.  You may obtain a copy of the License at
+- *
+- *      http://www.apache.org/licenses/LICENSE-2.0
+- *
+- *  Unless required by applicable law or agreed to in writing, software
+- *  distributed under the License is distributed on an "AS IS" BASIS,
+- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- *  See the License for the specific language governing permissions and
+- *  limitations under the License.
+- */
+-package winstone;
+-
+-import org.junit.Test;
+-import org.kohsuke.ajp.client.SimpleAjpClient;
+-import org.kohsuke.ajp.client.TesterAjpMessage;
+-
+-import java.util.HashMap;
+-import java.util.Map;
+-
+-/**
+- * @author Kohsuke Kawaguchi
+- */
+-public class Ajp13ConnectorFactoryTest extends AbstractWinstoneTest {
+-    @Test
+-    public void ajp() throws Exception {
+-        Map<String,String> args = new HashMap<String,String>();
+-        args.put("warfile", "target/test-classes/test.war");
+-        args.put("prefix", "/");
+-        args.put("httpPort", "-1");
+-        args.put("ajp13Port", "10059");
+-        winstone = new Launcher(args);
+-
+-        SimpleAjpClient ac = new SimpleAjpClient();
+-        ac.connect("localhost",10059);
+-
+-        validateCpong(ac.cping());
+-
+-        TesterAjpMessage forwardMessage = ac.createForwardMessage("/test.xxx");
+-        forwardMessage.addHeader("content-length","0");
+-        forwardMessage.end();
+-
+-        TesterAjpMessage emptyBody = ac.createBodyMessage(new byte[0]);
+-        emptyBody.end();
+-
+-        // Two requests
+-        for (int i = 0; i < 2; i++) {
+-            TesterAjpMessage responseHeaders = ac.sendMessage(forwardMessage);
+-            // Expect 3 packets: headers, body, end
+-            validateResponseHeaders(responseHeaders, 200);
+-            TesterAjpMessage responseBody = ac.readMessage();
+-            validateResponseBody(responseBody, "Hello");
+-            validateResponseEnd(ac.readMessage(), true);
+-
+-            // Give connections plenty of time to time out
+-            Thread.sleep(2000);
+-
+-            // Double check the connection is still open
+-            validateCpong(ac.cping());
+-        }
+-
+-        ac.disconnect();
+-    }
+-
+-
+-    /**
+-     * Process response header packet and checks the status. Any other data is
+-     * ignored.
+-     */
+-    private void validateResponseHeaders(TesterAjpMessage message,
+-            int expectedStatus) throws Exception {
+-        // First two bytes should always be AB
+-        assertEquals((byte) 'A', message.raw()[0]);
+-        assertEquals((byte) 'B', message.raw()[1]);
+-
+-        // Set the start position and read the length
+-        message.processHeader(false);
+-
+-        // Check the length
+-        assertTrue(message.getLen() > 0);
+-
+-        // Should be a header message
+-        assertEquals(0x04, message.readByte());
+-
+-        // Check status
+-        assertEquals(expectedStatus, message.readInt());
+-
+-        // Read the status message
+-        message.readString();
+-
+-        // Get the number of headers
+-        int headerCount = message.readInt();
+-
+-        for (int i = 0; i < headerCount; i++) {
+-            // Read the header name
+-            message.readHeaderName();
+-            // Read the header value
+-            message.readString();
+-        }
+-    }
+-
+-    /**
+-     * Validates that the response message is valid and contains the expected
+-     * content.
+-     */
+-    private void validateResponseBody(TesterAjpMessage message,
+-            String expectedBody) throws Exception {
+-
+-        assertEquals((byte) 'A', message.raw()[0]);
+-        assertEquals((byte) 'B', message.raw()[1]);
+-
+-        // Set the start position and read the length
+-        message.processHeader(false);
+-
+-        // Should be a body chunk message
+-        assertEquals(0x03, message.readByte());
+-
+-        int len = message.readInt();
+-        assertTrue(len > 0);
+-        String body = message.readString(len);
+-
+-        assertTrue(body.contains(expectedBody));
+-    }
+-
+-    private void validateResponseEnd(TesterAjpMessage message,
+-            boolean expectedReuse) {
+-        assertEquals((byte) 'A', message.raw()[0]);
+-        assertEquals((byte) 'B', message.raw()[1]);
+-
+-        message.processHeader(false);
+-
+-        // Should be an end body message
+-        assertEquals(0x05, message.readByte());
+-
+-        // Check the length
+-        assertEquals(2, message.getLen());
+-
+-        boolean reuse = false;
+-        if (message.readByte() > 0) {
+-            reuse = true;
+-        }
+-
+-        assertEquals(Boolean.valueOf(expectedReuse), Boolean.valueOf(reuse));
+-    }
+-
+-    private void validateCpong(TesterAjpMessage message) throws Exception {
+-        // First two bytes should always be AB
+-        assertEquals((byte) 'A', message.raw()[0]);
+-        assertEquals((byte) 'B', message.raw()[1]);
+-        // CPONG should have a message length of 1
+-        // This effectively checks the next two bytes
+-        assertEquals(1, message.getLen());
+-        // Data should be the value 9
+-        assertEquals(9, message.raw()[4]);
+-    }
+-}
+-- 
+2.1.0
+
diff --git a/0001-Remove-AJP-support.patch b/0001-Remove-AJP-support.patch
deleted file mode 100644
index eb8bc01..0000000
--- a/0001-Remove-AJP-support.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 6b232dc0844cf389d61a4dad54474207428acc27 Mon Sep 17 00:00:00 2001
-From: Michal Srb <msrb at redhat.com>
-Date: Tue, 2 Sep 2014 04:59:31 +0200
-Subject: [PATCH 1/2] Remove AJP support
-
----
- src/java/winstone/Launcher.java | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/src/java/winstone/Launcher.java b/src/java/winstone/Launcher.java
-index aacce18..e2217a7 100644
---- a/src/java/winstone/Launcher.java
-+++ b/src/java/winstone/Launcher.java
-@@ -48,7 +48,6 @@ public class Launcher implements Runnable {
-     
-     static final String HTTP_LISTENER_CLASS = "winstone.HttpConnectorFactory";
-     static final String HTTPS_LISTENER_CLASS = "winstone.HttpsConnectorFactory";
--    static final String AJP_LISTENER_CLASS = "winstone.Ajp13ConnectorFactory";
- 
-     public static final byte SHUTDOWN_TYPE = (byte) '0';
-     public static final byte RELOAD_TYPE = (byte) '4';
-@@ -143,9 +142,8 @@ public class Launcher implements Runnable {
-             this.hostGroup = new HostGroup(server, commonLibCL,
-                     commonLibCLPaths.toArray(new File[0]), args);
- 
--            // Create connectors (http, https and ajp)
-+            // Create connectors (http, https)
-             spawnListener(HTTP_LISTENER_CLASS);
--            spawnListener(AJP_LISTENER_CLASS);
-             spawnListener(HTTPS_LISTENER_CLASS);
- 
-             server.setThreadPool(new ExecutorThreadPool(threadPool));
--- 
-1.9.3
-
diff --git a/jenkins-winstone.spec b/jenkins-winstone.spec
index aa09d5d..c614f4f 100644
--- a/jenkins-winstone.spec
+++ b/jenkins-winstone.spec
@@ -2,17 +2,17 @@
 
 Name:           jenkins-winstone
 Version:        2.8
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Jenkins Winstone servlet container
 
 License:        LGPLv2+ or CDDL
 URL:            https://github.com/jenkinsci/winstone
 Source0:        https://github.com/jenkinsci/%{shortname}/archive/%{shortname}-%{version}.tar.gz
 
-# missing dep jetty-ajp
-Patch0:         0001-Remove-AJP-support.patch
 # make it work with Java 8
-Patch1:         0002-Fix-Java-8-compatibility.patch
+Patch0:         0002-Fix-Java-8-compatibility.patch
+# port to Jetty 9
+Patch1:         0001-Port-to-Jetty-9.patch
 
 BuildArch:      noarch
 
@@ -37,16 +37,6 @@ This package contains the API documentation for %{name}.
 %patch0 -p1
 %patch1 -p1
 
-# we don't need support for AJP (and we don't have jetty-ajp)
-rm src/java/winstone/Ajp13ConnectorFactory.java
-%pom_remove_dep org.eclipse.jetty:jetty-ajp
-
-# no support for SPDY
-%pom_remove_dep org.eclipse.jetty.spdy:spdy-jetty-http
-
-# build with jetty 8
-%pom_change_dep org.eclipse.jetty: ::8.1.14.v20131031
-
 %pom_remove_plugin :maven-antrun-plugin
 %pom_remove_plugin :maven-shade-plugin
 
@@ -70,6 +60,9 @@ done
 %doc LICENSE-CDDL.txt LICENSE-LGPL.txt
 
 %changelog
+* Thu Apr 23 2015 Michal Srb <msrb at redhat.com> - 2.8-2
+- Port to Jetty 9
+
 * Mon Oct 27 2014 Michal Srb <msrb at redhat.com> - 2.8-1
 - Update to upstream version 2.8
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/jenkins-winstone.git/commit/?h=master&id=11fcc12e075cf05716927720c66230b921b2445f


More information about the scm-commits mailing list