[apache-directory-server] 05/07: Transition to Jetty 9
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Tue May 17 13:28:20 UTC 2016
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository apache-directory-server.
commit 7ffd7d27dac864b72e78c14c32c65a384abee399
Author: Emmanuel Bourg <ebourg at apache.org>
Date: Tue May 17 15:17:06 2016 +0200
Transition to Jetty 9
---
debian/changelog | 2 +-
debian/control | 2 +-
debian/maven.rules | 4 +--
debian/patches/03-jetty-compatibility.patch | 51 +++++++++++++++++++++++++----
4 files changed, 49 insertions(+), 10 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 2bc9462..87be844 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,6 @@
apache-directory-server (2.0.0~M15-4) UNRELEASED; urgency=medium
- * Transition to Jetty 8
+ * Transition to Jetty 9
* Build with the DH sequencer instead of CDBS
* Standards-Version updated to 3.9.8 (no changes)
* Use a secure Vcs-Git URL
diff --git a/debian/control b/debian/control
index 2069c23..85bb46e 100644
--- a/debian/control
+++ b/debian/control
@@ -13,7 +13,7 @@ Build-Depends: ant,
libbcprov-java,
libcommons-collections3-java,
libehcache-java (>= 2.6.11-2~),
- libjetty8-java,
+ libjetty9-java,
liblog4j1.2-java (>= 1.2.17),
libmaven-bundle-plugin-java,
libmaven-dependency-plugin-java,
diff --git a/debian/maven.rules b/debian/maven.rules
index 30e3d22..6244852 100644
--- a/debian/maven.rules
+++ b/debian/maven.rules
@@ -9,5 +9,5 @@ log4j log4j * s/1\.2\..*/1.2.x/ * *
s/ant/org.apache.ant/ * * s/.*/debian/ * *
org.apache.directory.api s/api-.*/api-all/ * s/.*/debian/ * *
org.apache.mina * s/.*/jar/ s/2\..*/2.x/ * *
-s/org.mortbay.jetty/org.eclipse.jetty/ s/jetty/jetty-webapp/ * s/.*/debian/ * *
-s/org.mortbay.jetty/org.eclipse.jetty/ jetty-util * s/.*/debian/ * *
+s/org.mortbay.jetty/org.eclipse.jetty/ s/jetty/jetty-webapp/ * s/.*/9.x/ * *
+s/org.mortbay.jetty/org.eclipse.jetty/ jetty-util * s/.*/9.x/ * *
diff --git a/debian/patches/03-jetty-compatibility.patch b/debian/patches/03-jetty-compatibility.patch
index dfbd8dd..faf0029 100644
--- a/debian/patches/03-jetty-compatibility.patch
+++ b/debian/patches/03-jetty-compatibility.patch
@@ -1,6 +1,9 @@
+Description: Upgrade the version of Jetty used
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: https://github.com/apache/directory-server/pull/1
--- a/http-integration/src/main/java/org/apache/directory/server/integration/http/HttpServer.java
+++ b/http-integration/src/main/java/org/apache/directory/server/integration/http/HttpServer.java
-@@ -45,13 +45,14 @@
+@@ -45,13 +45,18 @@
import org.apache.directory.server.i18n.I18n;
import org.apache.directory.server.protocol.shared.transport.TcpTransport;
import org.bouncycastle.jce.provider.X509CertParser;
@@ -12,17 +15,53 @@
-import org.mortbay.jetty.webapp.WebAppContext;
-import org.mortbay.xml.XmlConfiguration;
+import org.eclipse.jetty.server.Handler;
-+import org.eclipse.jetty.server.handler.HandlerList;
++import org.eclipse.jetty.server.HttpConfiguration;
++import org.eclipse.jetty.server.HttpConnectionFactory;
++import org.eclipse.jetty.server.SecureRequestCustomizer;
+import org.eclipse.jetty.server.Server;
++import org.eclipse.jetty.server.ServerConnector;
++import org.eclipse.jetty.server.SslConnectionFactory;
+import org.eclipse.jetty.server.handler.ContextHandler;
-+import org.eclipse.jetty.server.nio.SelectChannelConnector;
-+import org.eclipse.jetty.server.ssl.SslSocketConnector;
++import org.eclipse.jetty.server.handler.HandlerList;
++import org.eclipse.jetty.util.ssl.SslContextFactory;
+import org.eclipse.jetty.webapp.WebAppContext;
+import org.eclipse.jetty.xml.XmlConfiguration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-@@ -216,13 +217,13 @@
+@@ -168,7 +173,7 @@
+
+ if ( httpTransport != null )
+ {
+- SelectChannelConnector httpConnector = new SelectChannelConnector();
++ ServerConnector httpConnector = new ServerConnector( jetty );
+ httpConnector.setPort( httpTransport.getPort() );
+ httpConnector.setHost( httpTransport.getAddress() );
+ jetty.addConnector( httpConnector );
+@@ -205,24 +210,31 @@
+ ks.store( stream, password.toCharArray() );
+ stream.close();
+
+- SslSocketConnector httpsConnector = new SslSocketConnector();
++ SslContextFactory sslContextFactory = new SslContextFactory();
++ sslContextFactory.setKeyStoreType( "JKS" );
++ sslContextFactory.setKeyStorePath( ksFile.getAbsolutePath() );
++ sslContextFactory.setKeyStorePassword( password );
++ sslContextFactory.setKeyManagerPassword( password );
++
++ HttpConfiguration httpsConfiguration = new HttpConfiguration();
++ httpsConfiguration.setSecureScheme( "https" );
++ httpsConfiguration.setSecurePort( httpsTransport.getPort() );
++ httpsConfiguration.addCustomizer( new SecureRequestCustomizer() );
++
++ ServerConnector httpsConnector = new ServerConnector( jetty, new SslConnectionFactory( sslContextFactory, "http/1.1" ), new HttpConnectionFactory( httpsConfiguration ) );
+ httpsConnector.setPort( httpsTransport.getPort() );
+ httpsConnector.setHost( httpsTransport.getAddress() );
+- httpsConnector.setKeystoreType( ks.getType() );
+- httpsConnector.setKeystore( ksFile.getAbsolutePath() );
+- httpsConnector.setPassword( password );
+- httpsConnector.setKeyPassword( password );
+
jetty.addConnector( httpsConnector );
}
@@ -38,7 +77,7 @@
webapp.setParentLoaderPriority( true );
}
-@@ -255,13 +256,13 @@
+@@ -255,13 +267,13 @@
}
webapp.setContextPath( "/" + ctxName );
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/apache-directory-server.git
More information about the pkg-java-commits
mailing list