FELIX-4310, FELIX-4282 - mixed Jetty versions:
- the cometd project referenced an older version of Jetty (7.6.3),
which is not directly incorrect, but not inline with the other
projects;
- due to this, classes of two different Jetty versions were inlined
in the http.bundle project, causing subtle errors at runtime;
- upgraded Cometd to 2.7.0 as Cometd 2.4.2 uses Jetty 7.6.3 as
compile-time dependency, while the 2.7.0 uses Jetty 7.6.13;
- reverted changes for Jetty 9 to make use of latest Jetty 7.6.13
version (for fix-release);
- updated POMs to use version-properties for most of the used
libraries. Also downgraded the version numbers in preparation for
a fix-release.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1540479 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/http/api/pom.xml b/http/api/pom.xml
index 2f94873..e1c2519 100644
--- a/http/api/pom.xml
+++ b/http/api/pom.xml
@@ -28,7 +28,7 @@
<name>Apache Felix Http Api</name>
<artifactId>org.apache.felix.http.api</artifactId>
- <version>2.3.0-SNAPSHOT</version>
+ <version>2.2.2-SNAPSHOT</version>
<packaging>jar</packaging>
<scm>
@@ -45,7 +45,7 @@
<configuration>
<instructions>
<Export-Package>
- org.apache.felix.http.api;version=2.0.4
+ org.apache.felix.http.api;version=${http.api.version}
</Export-Package>
</instructions>
</configuration>
diff --git a/http/base/pom.xml b/http/base/pom.xml
index eb38d42..8a5115e 100644
--- a/http/base/pom.xml
+++ b/http/base/pom.xml
@@ -28,7 +28,7 @@
<name>Apache Felix Http Base</name>
<artifactId>org.apache.felix.http.base</artifactId>
- <version>2.3.0-SNAPSHOT</version>
+ <version>2.2.2-SNAPSHOT</version>
<packaging>jar</packaging>
<scm>
@@ -65,7 +65,6 @@
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
- <version>4.2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -74,9 +73,9 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>${pom.groupId}</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.api</artifactId>
- <version>2.2.0</version>
+ <version>${project.version}</version>
</dependency>
</dependencies>
diff --git a/http/bridge/pom.xml b/http/bridge/pom.xml
index 7601355..84e907f 100644
--- a/http/bridge/pom.xml
+++ b/http/bridge/pom.xml
@@ -28,7 +28,7 @@
<name>Apache Felix Http Bridge</name>
<artifactId>org.apache.felix.http.bridge</artifactId>
- <version>2.3.0-SNAPSHOT</version>
+ <version>2.2.2-SNAPSHOT</version>
<packaging>jar</packaging>
<scm>
@@ -48,8 +48,8 @@
org.apache.felix.http.bridge.internal.BridgeActivator
</Bundle-Activator>
<Export-Package>
- org.apache.felix.http.api;version=2.0.4,
- org.osgi.service.http;version=1.2.0
+ org.apache.felix.http.api;version=${http.api.version},
+ org.osgi.service.http;version=${http.service.version}
</Export-Package>
<Private-Package>
org.apache.felix.http.base.*,
@@ -82,14 +82,14 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>${pom.groupId}</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.api</artifactId>
- <version>${pom.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
- <groupId>${pom.groupId}</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.base</artifactId>
- <version>${pom.version}</version>
+ <version>${project.version}</version>
</dependency>
</dependencies>
diff --git a/http/bundle/pom.xml b/http/bundle/pom.xml
index 93e7d67..d1db2b5 100644
--- a/http/bundle/pom.xml
+++ b/http/bundle/pom.xml
@@ -28,7 +28,7 @@
<name>Apache Felix Http Bundle</name>
<artifactId>org.apache.felix.http.bundle</artifactId>
- <version>2.3.0-SNAPSHOT</version>
+ <version>2.2.2-SNAPSHOT</version>
<packaging>jar</packaging>
<scm>
@@ -48,13 +48,13 @@
org.apache.felix.http.bundle.internal.CombinedActivator
</Bundle-Activator>
<Export-Package>
- org.apache.felix.http.api;version=${project.version};-split-package:=merge-first,
+ org.apache.felix.http.api;version${http.api.version};-split-package:=merge-first,
org.apache.felix.http.cometd;version=${project.version};-split-package:=merge-first,
- org.osgi.service.http;version=1.2.0;-split-package:=merge-first,
- org.cometd.bayeux;version=2.4.2;-split-package:=merge-first,
- org.cometd.bayeux.client;version=2.4.2;-split-package:=merge-first,
- org.cometd.bayeux.server;version=2.4.2;-split-package:=merge-first,
- javax.servlet.*;version=2.5;-split-package:=merge-first
+ org.osgi.service.http;version=${http.service.version};-split-package:=merge-first,
+ org.cometd.bayeux;version=${cometd.version};-split-package:=merge-first,
+ org.cometd.bayeux.client;version=${cometd.version};-split-package:=merge-first,
+ org.cometd.bayeux.server;version=${cometd.version};-split-package:=merge-first,
+ javax.servlet.*;version=${servlet.version};-split-package:=merge-first
</Export-Package>
<Private-Package>
org.apache.felix.http.base.*;-split-package:=merge-first,
@@ -97,25 +97,24 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>${pom.groupId}</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.bridge</artifactId>
- <version>${pom.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
- <groupId>${pom.groupId}</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.cometd</artifactId>
- <version>${pom.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
- <groupId>${pom.groupId}</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.jetty</artifactId>
- <version>${pom.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
- <groupId>${pom.groupId}</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.whiteboard</artifactId>
- <version>${pom.version}</version>
+ <version>${project.version}</version>
</dependency>
</dependencies>
-
</project>
diff --git a/http/cometd/pom.xml b/http/cometd/pom.xml
index 1f4534d..77b2548 100644
--- a/http/cometd/pom.xml
+++ b/http/cometd/pom.xml
@@ -28,7 +28,7 @@
<name>Apache Felix Http Cometd</name>
<artifactId>org.apache.felix.http.cometd</artifactId>
- <version>2.3.0-SNAPSHOT</version>
+ <version>2.2.2-SNAPSHOT</version>
<packaging>jar</packaging>
<scm>
@@ -49,9 +49,9 @@
</Bundle-Activator>
<Export-Package>
org.apache.felix.http.cometd;version=${project.version},
- org.cometd.bayeux;version=2.4.2,
- org.cometd.bayeux.client;version=2.4.2,
- org.cometd.client;version=2.4.2
+ org.cometd.bayeux;version=${cometd.version},
+ org.cometd.bayeux.client;version=${cometd.version},
+ org.cometd.client;version=${cometd.version}
</Export-Package>
<Private-Package>
org.apache.felix.http.base.*,
@@ -87,27 +87,27 @@
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
- <version>7.6.3.v20120416</version>
+ <version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.cometd.java</groupId>
<artifactId>cometd-java-server</artifactId>
- <version>2.4.2</version>
+ <version>${cometd.version}</version>
</dependency>
<dependency>
<groupId>org.cometd.java</groupId>
<artifactId>cometd-java-client</artifactId>
- <version>2.4.2</version>
+ <version>${cometd.version}</version>
</dependency>
<dependency>
<groupId>org.cometd.java</groupId>
<artifactId>cometd-java-common</artifactId>
- <version>2.4.2</version>
+ <version>${cometd.version}</version>
</dependency>
<dependency>
<groupId>org.cometd.java</groupId>
<artifactId>bayeux-api</artifactId>
- <version>2.4.2</version>
+ <version>${cometd.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
diff --git a/http/jetty/pom.xml b/http/jetty/pom.xml
index 735868e..e474cf8 100644
--- a/http/jetty/pom.xml
+++ b/http/jetty/pom.xml
@@ -28,7 +28,7 @@
<name>Apache Felix Http Jetty</name>
<artifactId>org.apache.felix.http.jetty</artifactId>
- <version>2.3.0-SNAPSHOT</version>
+ <version>2.2.2-SNAPSHOT</version>
<packaging>jar</packaging>
<scm>
@@ -38,7 +38,7 @@
</scm>
<properties>
- <jetty.version>9.0.5.v20130815</jetty.version>
+ <!-- jetty.version is moved to http-parent POM -->
</properties>
<build>
@@ -52,9 +52,9 @@
org.apache.felix.http.jetty.internal.JettyActivator
</Bundle-Activator>
<Export-Package>
- org.apache.felix.http.api;version=2.0.4,
- org.osgi.service.http,
- javax.servlet.*;version=2.5;-split-package:=merge-first
+ org.apache.felix.http.api;version=${http.api.version},
+ org.osgi.service.http;version=${http.service.version},
+ javax.servlet.*;version=${servlet.version};-split-package:=merge-first
</Export-Package>
<Private-Package>
org.apache.felix.http.base.*,
@@ -81,13 +81,11 @@
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
- <version>4.2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.compendium</artifactId>
- <version>4.2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -127,12 +125,12 @@
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.http.api</artifactId>
- <version>2.2.0</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.http.base</artifactId>
- <version>2.3.0-SNAPSHOT</version>
+ <version>${project.version}</version>
</dependency>
</dependencies>
diff --git a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java
index bcc5162..cbac529 100644
--- a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java
+++ b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java
@@ -60,7 +60,7 @@
/** Felix specific property to control whether to enable HTTPS. */
private static final String FELIX_HTTPS_ENABLE = "org.apache.felix.https.enable";
- private static final String OSCAR_HTTPS_ENABLE = "org.ungoverned.osgi.bundle.https.enable";
+ private static final String OSCAR_HTTPS_ENABLE = "org.ungoverned.osgi.bundle.https.enable";
/** Felix specific property to control whether to enable HTTP. */
private static final String FELIX_HTTP_ENABLE = "org.apache.felix.http.enable";
@@ -75,10 +75,10 @@
private static final String FELIX_HTTPS_CLIENT_CERT = "org.apache.felix.https.clientcertificate";
/** Felix specific property to control whether Jetty uses NIO or not for HTTP. Valid values are "true", "false". Default is true */
- public static final String FELIX_HTTP_NIO = "org.apache.felix.http.nio";
+ public static final String FELIX_HTTP_NIO = "org.apache.felix.http.nio";
/** Felix specific property to control whether Jetty uses NIO or not for HTTPS. Valid values are "true", "false". Default is the value of org.apache.felix.http.nio */
- public static final String FELIX_HTTPS_NIO = "org.apache.felix.https.nio";
+ public static final String FELIX_HTTPS_NIO = "org.apache.felix.https.nio";
/** Felix specific property to configure the session timeout in minutes (same session-timout in web.xml). Default is servlet container specific */
public static final String FELIX_SESSION_TIMEOUT = "org.apache.felix.http.session.timeout";
@@ -146,7 +146,8 @@
}
/**
- * Returns <code>true</code> if HTTP is configured to be used ( {@link #FELIX_HTTP_ENABLE}) and
+ * Returns <code>true</code> if HTTP is configured to be used (
+ * {@link #FELIX_HTTP_ENABLE}) and
* the configured HTTP port ({@link #HTTP_PORT}) is higher than zero.
*/
public boolean isUseHttp()
@@ -154,14 +155,14 @@
return this.useHttp && getHttpPort() > 0;
}
- @Deprecated
public boolean isUseHttpNio()
{
return this.useHttpNio;
}
/**
- * Returns <code>true</code> if HTTPS is configured to be used ( {@link #FELIX_HTTPS_ENABLE}) and
+ * Returns <code>true</code> if HTTPS is configured to be used (
+ * {@link #FELIX_HTTPS_ENABLE}) and
* the configured HTTP port ({@link #HTTPS_PORT}) is higher than zero.
*/
public boolean isUseHttps()
@@ -169,7 +170,6 @@
return this.useHttps && getHttpsPort() > 0;
}
- @Deprecated
public boolean isUseHttpsNio()
{
return this.useHttpsNio;
@@ -277,10 +277,8 @@
this.httpTimeout = getIntProperty(props, HTTP_TIMEOUT, 60000);
this.keystore = getProperty(props, FELIX_KEYSTORE, this.context.getProperty(OSCAR_KEYSTORE));
this.password = getProperty(props, FELIX_KEYSTORE_PASSWORD, this.context.getProperty(OSCAR_KEYSTORE_PASSWORD));
- this.keyPassword =
- getProperty(props, FELIX_KEYSTORE_KEY_PASSWORD, this.context.getProperty(OSCAR_KEYSTORE_KEY_PASSWORD));
- this.useHttps =
- getBooleanProperty(props, FELIX_HTTPS_ENABLE, getBooleanProperty(props, OSCAR_HTTPS_ENABLE, false));
+ this.keyPassword = getProperty(props, FELIX_KEYSTORE_KEY_PASSWORD, this.context.getProperty(OSCAR_KEYSTORE_KEY_PASSWORD));
+ this.useHttps = getBooleanProperty(props, FELIX_HTTPS_ENABLE, getBooleanProperty(props, OSCAR_HTTPS_ENABLE, false));
this.useHttp = getBooleanProperty(props, FELIX_HTTP_ENABLE, true);
this.truststore = getProperty(props, FELIX_TRUSTSTORE, null);
this.trustPassword = getProperty(props, FELIX_TRUSTSTORE_PASSWORD, null);
@@ -329,8 +327,7 @@
{
try {
return Integer.parseInt(getProperty(props, name, null));
- }
- catch (Exception e) {
+ } catch (Exception e) {
return defValue;
}
}
@@ -345,7 +342,7 @@
if (value instanceof String)
{
return new String[]
- { (String) value };
+ { (String) value };
}
else if (value instanceof String[])
{
@@ -431,8 +428,7 @@
{
try {
return Integer.parseInt(getProperty(name, null));
- }
- catch (Exception e) {
+ } catch (Exception e) {
return defValue;
}
}
diff --git a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyLogger.java b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyLogger.java
index edfcfcc..4f89666 100644
--- a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyLogger.java
+++ b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyLogger.java
@@ -54,57 +54,57 @@
this.debugEnabled = enabled;
}
- public void debug(Throwable throwable) {
- if (this.debugEnabled) {
- SystemLogger.debug(throwable.getMessage());
- }
+ public void debug(Throwable throwable) {
+ if (this.debugEnabled) {
+ SystemLogger.debug(throwable.getMessage());
+ }
+
+ }
- }
+ public void debug(String msg, Object... args) {
+ if (this.debugEnabled) {
+ SystemLogger.debug(MessageFormat.format(msg, args));
+ }
+ }
- public void debug(String msg, Object... args) {
- if (this.debugEnabled) {
- SystemLogger.debug(MessageFormat.format(msg, args));
- }
- }
+ public void debug(String msg, Throwable throwable) {
+ if (this.debugEnabled) {
+ SystemLogger.debug(msg + ": " + throwable.getMessage());
+ }
+ }
- public void debug(String msg, Throwable throwable) {
- if (this.debugEnabled) {
- SystemLogger.debug(msg + ": " + throwable.getMessage());
- }
- }
+ public String getName() {
+ return name;
+ }
- public String getName() {
- return name;
- }
+ public void ignore(Throwable throwable) {
+
+ }
- public void ignore(Throwable throwable) {
+ public void info(Throwable throwable) {
+ SystemLogger.info(throwable.getMessage());
+ }
- }
+ public void info(String msg, Object... args) {
+ SystemLogger.info(MessageFormat.format(msg, args));
+
+ }
- public void info(Throwable throwable) {
- SystemLogger.info(throwable.getMessage());
- }
+ public void info(String msg, Throwable throwable) {
+ SystemLogger.info(msg + ": " + throwable.getMessage());
+ }
- public void info(String msg, Object... args) {
- SystemLogger.info(MessageFormat.format(msg, args));
+ public void warn(Throwable throwable) {
+ SystemLogger.warning(null, throwable);
+ }
- }
+ public void warn(String msg, Object... args) {
+ SystemLogger.warning(MessageFormat.format(msg, args), null);
+
+ }
- public void info(String msg, Throwable throwable) {
- SystemLogger.info(msg + ": " + throwable.getMessage());
- }
-
- public void warn(Throwable throwable) {
- SystemLogger.warning(null, throwable);
- }
-
- public void warn(String msg, Object... args) {
- SystemLogger.warning(MessageFormat.format(msg, args), null);
-
- }
-
- public void warn(String msg, Throwable throwable) {
- SystemLogger.warning(msg, throwable);
- }
+ public void warn(String msg, Throwable throwable) {
+ SystemLogger.warning(msg, throwable);
+ }
}
diff --git a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java
index 43a2d93..4dc0a36 100644
--- a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java
+++ b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java
@@ -34,29 +34,25 @@
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
-import javax.servlet.ServletContext;
-
import org.apache.felix.http.base.internal.DispatcherServlet;
import org.apache.felix.http.base.internal.EventDispatcher;
import org.apache.felix.http.base.internal.HttpServiceController;
import org.apache.felix.http.base.internal.logger.SystemLogger;
import org.eclipse.jetty.security.HashLoginService;
import org.eclipse.jetty.server.Connector;
-import org.eclipse.jetty.server.ConnectorStatistics;
-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.server.SessionManager;
-import org.eclipse.jetty.server.SslConnectionFactory;
+import org.eclipse.jetty.server.bio.SocketConnector;
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
import org.eclipse.jetty.server.handler.StatisticsHandler;
-import org.eclipse.jetty.server.session.HashSessionManager;
+import org.eclipse.jetty.server.nio.SelectChannelConnector;
+import org.eclipse.jetty.server.ssl.SslConnector;
+import org.eclipse.jetty.server.ssl.SslSelectChannelConnector;
+import org.eclipse.jetty.server.ssl.SslSocketConnector;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.util.component.AbstractLifeCycle;
import org.eclipse.jetty.util.component.LifeCycle;
-import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleEvent;
@@ -70,9 +66,11 @@
import org.osgi.util.tracker.ServiceTracker;
import org.osgi.util.tracker.ServiceTrackerCustomizer;
+import javax.servlet.ServletContext;
+
public final class JettyService
- extends AbstractLifeCycle.AbstractLifeCycleListener
- implements BundleTrackerCustomizer, ServiceTrackerCustomizer
+ extends AbstractLifeCycle.AbstractLifeCycleListener
+ implements BundleTrackerCustomizer, ServiceTrackerCustomizer
{
/** PID for configuration of the HTTP service. */
private static final String PID = "org.apache.felix.http";
@@ -121,8 +119,8 @@
new JettyManagedService(this), props);
this.executor = Executors.newSingleThreadExecutor(new ThreadFactory() {
- public Thread newThread(Runnable runnable)
- {
+ public Thread newThread(Runnable runnable)
+ {
Thread t = new Thread(runnable);
t.setName("Jetty HTTP Service");
return t;
@@ -177,7 +175,7 @@
{
this.config.update(props);
- if (this.executor != null && !this.executor.isShutdown()) {
+ if (this.executor != null && !this.executor.isShutdown()) {
this.executor.submit(new JettyOperation() {
@Override
protected void doExecute() throws Exception {
@@ -192,8 +190,7 @@
{
try {
initializeJetty();
- }
- catch (Exception e) {
+ } catch (Exception e) {
SystemLogger.error("Exception while initializing Jetty.", e);
}
}
@@ -225,13 +222,16 @@
{
if (this.config.isUseHttp() || this.config.isUseHttps())
{
+ StringBuffer message = new StringBuffer("Started jetty ").append(Server.getVersion()).append(" at port(s)");
+ HashLoginService realm = new HashLoginService("OSGi HTTP Service Realm");
this.server = new Server();
this.server.addLifeCycleListener(this);
- HashLoginService realm = new HashLoginService("OSGi HTTP Service Realm");
+ // HTTP/1.1 requires Date header if possible (it is)
+ this.server.setSendDateHeader(true);
+
this.server.addBean(realm);
- StringBuffer message = new StringBuffer("Started jetty ").append(Server.getVersion()).append(" at port(s)");
if (this.config.isUseHttp())
{
initializeHttp();
@@ -247,7 +247,7 @@
this.parent = new ContextHandlerCollection();
ServletContextHandler context = new ServletContextHandler(this.parent,
- this.config.getContextPath(), ServletContextHandler.SESSIONS);
+ this.config.getContextPath(), ServletContextHandler.SESSIONS);
message.append(" on context path ").append(this.config.getContextPath());
configureSessionManager(context);
@@ -277,103 +277,139 @@
private void initializeHttp()
throws Exception
{
- HttpConfiguration config = new HttpConfiguration();
- config.setSendDateHeader(true);
- config.setRequestHeaderSize(this.config.getRequestBufferSize());
- config.setResponseHeaderSize(this.config.getResponseBufferSize());
-
- ServerConnector connector = new ServerConnector(this.server, new HttpConnectionFactory(config));
+ Connector connector = this.config.isUseHttpNio()
+ ? new SelectChannelConnector()
+ : new SocketConnector();
connector.setPort(this.config.getHttpPort());
-
configureConnector(connector);
-
this.server.addConnector(connector);
}
private void initializeHttps()
throws Exception
{
- HttpConfiguration config = new HttpConfiguration();
- config.setSendDateHeader(true);
- config.setSecurePort(this.config.getHttpsPort());
- config.setSecureScheme("https");
- config.setRequestHeaderSize(this.config.getRequestBufferSize());
- config.setResponseHeaderSize(this.config.getResponseBufferSize());
-
- SslContextFactory sslContextFactory = new SslContextFactory();
-
- if (this.config.getKeystore() != null)
+ // this massive code duplication is caused by the SslSelectChannelConnector
+ // and the SslSocketConnector not have a common API to setup security
+ // stuff
+ Connector connector;
+ if (this.config.isUseHttpsNio())
{
- sslContextFactory.setKeyStorePath(this.config.getKeystore());
+ SslSelectChannelConnector sslConnector = new SslSelectChannelConnector();
+
+ if (this.config.getKeystore() != null)
+ {
+ sslConnector.setKeystore(this.config.getKeystore());
+ }
+
+ if (this.config.getPassword() != null)
+ {
+ System.setProperty(SslSelectChannelConnector.PASSWORD_PROPERTY, this.config.getPassword());
+ sslConnector.setPassword(this.config.getPassword());
+ }
+
+ if (this.config.getKeyPassword() != null)
+ {
+ System.setProperty(SslSelectChannelConnector.KEYPASSWORD_PROPERTY, this.config.getKeyPassword());
+ sslConnector.setKeyPassword(this.config.getKeyPassword());
+ }
+
+ if (this.config.getTruststore() != null)
+ {
+ sslConnector.setTruststore(this.config.getTruststore());
+ }
+
+ if (this.config.getTrustPassword() != null)
+ {
+ sslConnector.setTrustPassword(this.config.getTrustPassword());
+ }
+
+ if ("wants".equals(this.config.getClientcert()))
+ {
+ sslConnector.setWantClientAuth(true);
+ }
+ else if ("needs".equals(this.config.getClientcert()))
+ {
+ sslConnector.setNeedClientAuth(true);
+ }
+
+ connector = sslConnector;
+ }
+ else
+ {
+ SslSocketConnector sslConnector = new SslSocketConnector();
+
+ if (this.config.getKeystore() != null)
+ {
+ sslConnector.setKeystore(this.config.getKeystore());
+ }
+
+ if (this.config.getPassword() != null)
+ {
+ System.setProperty(SslSelectChannelConnector.PASSWORD_PROPERTY, this.config.getPassword());
+ sslConnector.setPassword(this.config.getPassword());
+ }
+
+ if (this.config.getKeyPassword() != null)
+ {
+ System.setProperty(SslSelectChannelConnector.KEYPASSWORD_PROPERTY, this.config.getKeyPassword());
+ sslConnector.setKeyPassword(this.config.getKeyPassword());
+ }
+
+ if (this.config.getTruststore() != null)
+ {
+ sslConnector.setTruststore(this.config.getTruststore());
+ }
+
+ if (this.config.getTrustPassword() != null)
+ {
+ sslConnector.setTrustPassword(this.config.getTrustPassword());
+ }
+
+ if ("wants".equals(this.config.getClientcert()))
+ {
+ sslConnector.setWantClientAuth(true);
+ }
+ else if ("needs".equals(this.config.getClientcert()))
+ {
+ sslConnector.setNeedClientAuth(true);
+ }
+
+ connector = sslConnector;
}
- if (this.config.getPassword() != null)
- {
- sslContextFactory.setKeyManagerPassword(this.config.getPassword());
- }
-
- if (this.config.getKeyPassword() != null)
- {
- sslContextFactory.setKeyStorePassword(this.config.getKeyPassword());
- }
-
- if (this.config.getTruststore() != null)
- {
- sslContextFactory.setTrustStorePath(this.config.getTruststore());
- }
-
- if (this.config.getTrustPassword() != null)
- {
- sslContextFactory.setTrustStorePassword(this.config.getTrustPassword());
- }
-
- if ("wants".equals(this.config.getClientcert()))
- {
- sslContextFactory.setWantClientAuth(true);
- }
- else if ("needs".equals(this.config.getClientcert()))
- {
- sslContextFactory.setNeedClientAuth(true);
- }
-
- ServerConnector connector =
- new ServerConnector(this.server, new SslConnectionFactory(sslContextFactory, "http/1.1"),
- new HttpConnectionFactory(config));
connector.setPort(this.config.getHttpsPort());
-
configureConnector(connector);
this.server.addConnector(connector);
}
- private void configureConnector(final ServerConnector connector)
+ private void configureConnector(final Connector connector)
{
- connector.setIdleTimeout(this.config.getHttpTimeout());
+ connector.setMaxIdleTime(this.config.getHttpTimeout());
+ connector.setRequestBufferSize(this.config.getRequestBufferSize());
+ connector.setResponseBufferSize(this.config.getResponseBufferSize());
connector.setHost(this.config.getHost());
- connector.setHost(this.config.getHost());
+ connector.setStatsOn(this.config.isRegisterMBeans());
- if (this.config.isRegisterMBeans()) {
- connector.addBean(new ConnectorStatistics());
- }
+ // connector.setLowResourceMaxIdleTime(ms);
+ // connector.setRequestBufferSize(requestBufferSize);
+ // connector.setResponseBufferSize(responseBufferSize);
}
private void configureSessionManager(final ServletContextHandler context)
{
- HashSessionManager manager = new HashSessionManager();
+ final SessionManager manager = context.getSessionHandler().getSessionManager();
manager.setMaxInactiveInterval(this.config.getSessionTimeout() * 60);
- manager.setSessionIdPathParameterName(this.config.getProperty(
- SessionManager.__SessionIdPathParameterNameProperty, SessionManager.__DefaultSessionIdPathParameterName));
- manager.setSessionCookie(this.config.getProperty(SessionManager.__SessionCookieProperty,
- SessionManager.__DefaultSessionCookie));
- manager.setRefreshCookieAge(this.config.getIntProperty(SessionManager.__MaxAgeProperty, -1));
-// manager.setSessionDomain(this.config.getProperty(SessionManager.__SessionDomainProperty, SessionManager.__DefaultSessionDomain));
-// manager.setSessionPath(this.config.getProperty(SessionManager.__SessionPathProperty, context.getContextPath()));
- context.getSessionHandler().setSessionManager(manager);
+ manager.setSessionCookie(this.config.getProperty(SessionManager.__SessionCookieProperty, SessionManager.__DefaultSessionCookie));
+ manager.setSessionIdPathParameterName(this.config.getProperty(SessionManager.__SessionIdPathParameterNameProperty, SessionManager.__DefaultSessionIdPathParameterName));
+ manager.setSessionDomain(this.config.getProperty(SessionManager.__SessionDomainProperty, SessionManager.__DefaultSessionDomain));
+ manager.setSessionPath(this.config.getProperty(SessionManager.__SessionPathProperty, context.getContextPath()));
+ manager.setMaxCookieAge(this.config.getIntProperty(SessionManager.__MaxAgeProperty, -1));
}
- private String getEndpoint(final ServerConnector listener, final InetAddress ia)
+ private String getEndpoint(final Connector listener, final InetAddress ia)
{
if (ia.isLoopbackAddress())
{
@@ -381,16 +417,16 @@
}
String address = ia.getHostAddress().trim().toLowerCase();
- if (ia instanceof Inet6Address)
+ if ( ia instanceof Inet6Address )
{
// skip link-local
- if (address.startsWith("fe80:0:0:0:"))
+ if ( address.startsWith("fe80:0:0:0:") )
{
return null;
}
address = "[" + address + "]";
}
- else if (!(ia instanceof Inet4Address))
+ else if ( ! ( ia instanceof Inet4Address ) )
{
return null;
}
@@ -398,19 +434,19 @@
return getEndpoint(listener, address);
}
- private String getEndpoint(final ServerConnector listener, final String hostname)
+ private String getEndpoint(final Connector listener, final String hostname)
{
final StringBuilder sb = new StringBuilder();
sb.append("http");
int defaultPort = 80;
- if (listener.getConnectionFactory("https") instanceof SslConnectionFactory)
+ if ( listener instanceof SslConnector )
{
sb.append('s');
defaultPort = 443;
}
sb.append("://");
sb.append(hostname);
- if (listener.getPort() != defaultPort)
+ if ( listener.getPort() != defaultPort )
{
sb.append(':');
sb.append(String.valueOf(listener.getPort()));
@@ -420,7 +456,7 @@
return sb.toString();
}
- private List<String> getEndpoints(final ServerConnector connector, final List<NetworkInterface> interfaces)
+ private List<String> getEndpoints(final Connector connector, final List<NetworkInterface> interfaces)
{
final List<String> endpoints = new ArrayList<String>();
for (final NetworkInterface ni : interfaces)
@@ -444,23 +480,23 @@
final List<String> endpoints = new ArrayList<String>();
final Connector[] connectors = this.server.getConnectors();
- if (connectors != null)
+ if ( connectors != null )
{
- for (int i = 0; i < connectors.length; i++)
+ for(int i=0 ; i < connectors.length; i++)
{
- final ServerConnector connector = (ServerConnector) connectors[i];
+ final Connector connector = connectors[i];
- if (connector.getHost() == null)
+ if ( connector.getHost() == null )
{
try
{
final List<NetworkInterface> interfaces = new ArrayList<NetworkInterface>();
final List<NetworkInterface> loopBackInterfaces = new ArrayList<NetworkInterface>();
final Enumeration<NetworkInterface> nis = NetworkInterface.getNetworkInterfaces();
- while (nis.hasMoreElements())
+ while ( nis.hasMoreElements() )
{
final NetworkInterface ni = nis.nextElement();
- if (ni.isLoopback())
+ if ( ni.isLoopback() )
{
loopBackInterfaces.add(ni);
}
@@ -488,7 +524,7 @@
else
{
final String endpoint = this.getEndpoint(connector, connector.getHost());
- if (endpoint != null)
+ if ( endpoint != null )
{
endpoints.add(endpoint);
}
@@ -506,20 +542,20 @@
Deployment deployment = this.deployments.get(contextPath);
if (deployment != null) {
SystemLogger.warning(String.format(
- "Web application bundle %s has context path %s which is already registered",
- bundle.getSymbolicName(), contextPath), null);
+ "Web application bundle %s has context path %s which is already registered",
+ bundle.getSymbolicName(), contextPath), null);
postEvent(WebEvent.FAILED(bundle, this.context.getBundle(), null, contextPath,
- deployment.getBundle().getBundleId()));
+ deployment.getBundle().getBundleId()));
return null;
}
// check context path belonging to Http Service implementation
if (contextPath.equals("/")) {
SystemLogger.warning(String.format(
- "Web application bundle %s has context path %s which is reserved",
- bundle.getSymbolicName(), contextPath), null);
+ "Web application bundle %s has context path %s which is reserved",
+ bundle.getSymbolicName(), contextPath), null);
postEvent(WebEvent.FAILED(bundle, this.context.getBundle(), null, contextPath,
- this.context.getBundle().getBundleId()));
+ this.context.getBundle().getBundleId()));
return null;
}
@@ -527,8 +563,8 @@
for (String path : this.config.getPathExclusions()) {
if (contextPath.startsWith(path)) {
SystemLogger.warning(String.format(
- "Web application bundle %s has context path %s which clashes with excluded path prefix %s",
- bundle.getSymbolicName(), contextPath, path), null);
+ "Web application bundle %s has context path %s which clashes with excluded path prefix %s",
+ bundle.getSymbolicName(), contextPath, path), null);
postEvent(WebEvent.FAILED(bundle, this.context.getBundle(), null, path, null));
return null;
}
@@ -544,7 +580,7 @@
public void deploy(final Deployment deployment, final WebAppBundleContext context)
{
- if (this.executor != null && !this.executor.isShutdown()) {
+ if (this.executor != null && !this.executor.isShutdown()) {
this.executor.submit(new JettyOperation() {
@Override
protected void doExecute() {
@@ -560,15 +596,13 @@
props.put(WEB_VERSION, webAppBundle.getVersion());
props.put(WEB_CONTEXT_PATH, deployment.getContextPath());
deployment.setRegistration(webAppBundle.getBundleContext().registerService(
- ServletContext.class.getName(), context.getServletContext(), props));
+ ServletContext.class.getName(), context.getServletContext(), props));
context.getServletContext().setAttribute(OSGI_BUNDLE_CONTEXT, webAppBundle.getBundleContext());
postEvent(WebEvent.DEPLOYED(webAppBundle, extenderBundle));
- }
- catch (Exception e) {
- SystemLogger.error(String.format("Deploying web application bundle %s failed.",
- webAppBundle.getSymbolicName()), e);
+ } catch (Exception e) {
+ SystemLogger.error(String.format("Deploying web application bundle %s failed.", webAppBundle.getSymbolicName()), e);
postEvent(WebEvent.FAILED(webAppBundle, extenderBundle, e, null, null));
deployment.setContext(null);
}
@@ -580,8 +614,8 @@
public void undeploy(final Deployment deployment, final WebAppBundleContext context)
{
- if (this.executor != null && !this.executor.isShutdown()) {
- this.executor.submit(new JettyOperation() {
+ if (this.executor != null && !this.executor.isShutdown()) {
+ this.executor.submit(new JettyOperation(){
@Override
protected void doExecute() {
final Bundle webAppBundle = deployment.getBundle();
@@ -598,13 +632,9 @@
}
deployment.setRegistration(null);
context.stop();
- }
- catch (Exception e) {
- SystemLogger.error(
- String.format("Undeploying web application bundle %s failed.",
- webAppBundle.getSymbolicName()), e);
- }
- finally {
+ } catch (Exception e) {
+ SystemLogger.error(String.format("Undeploying web application bundle %s failed.", webAppBundle.getSymbolicName()), e);
+ } finally {
postEvent(WebEvent.UNDEPLOYED(webAppBundle, extenderBundle));
}
}
@@ -626,7 +656,7 @@
private Object detectWebAppBundle(Bundle bundle)
{
if (bundle.getState() == Bundle.ACTIVE || (bundle.getState() == Bundle.STARTING &&
- "Lazy".equals(bundle.getHeaders().get(HEADER_ACTIVATION_POLICY)))) {
+ "Lazy".equals(bundle.getHeaders().get(HEADER_ACTIVATION_POLICY)))) {
String contextPath = (String) bundle.getHeaders().get(HEADER_WEB_CONTEXT_PATH);
if (contextPath != null) {
@@ -682,7 +712,7 @@
if (deployment.getContext() == null) {
postEvent(WebEvent.DEPLOYING(deployment.getBundle(), this.context.getBundle()));
WebAppBundleContext context = new WebAppBundleContext(deployment.getContextPath(),
- deployment.getBundle(), this.getClass().getClassLoader());
+ deployment.getBundle(), this.getClass().getClassLoader());
deploy(deployment, context);
}
}
@@ -758,8 +788,7 @@
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
doExecute();
return null;
- }
- finally {
+ } finally {
Thread.currentThread().setContextClassLoader(cl);
}
}
diff --git a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/MBeanServerTracker.java b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/MBeanServerTracker.java
index b0e940d..be0b16e 100644
--- a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/MBeanServerTracker.java
+++ b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/MBeanServerTracker.java
@@ -28,6 +28,7 @@
public class MBeanServerTracker extends ServiceTracker
{
+
private final Server server;
public MBeanServerTracker(final BundleContext context, final Server server)
@@ -41,7 +42,7 @@
{
MBeanServer server = (MBeanServer) super.addingService(reference);
MBeanContainer mBeanContainer = new MBeanContainer(server);
- this.server.addBean(mBeanContainer);
+ this.server.getContainer().addEventListener(mBeanContainer);
return mBeanContainer;
}
@@ -49,7 +50,7 @@
public void removedService(ServiceReference reference, Object service)
{
MBeanContainer mBeanContainer = (MBeanContainer) service;
- this.server.removeBean(mBeanContainer);
+ this.server.getContainer().removeEventListener(mBeanContainer);
super.removedService(reference, mBeanContainer.getMBeanServer());
}
}
diff --git a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/WebAppBundleContext.java b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/WebAppBundleContext.java
index 590efac..0c50c60 100644
--- a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/WebAppBundleContext.java
+++ b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/WebAppBundleContext.java
@@ -16,18 +16,18 @@
*/
package org.apache.felix.http.jetty.internal;
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Enumeration;
-
import org.eclipse.jetty.util.URIUtil;
import org.eclipse.jetty.util.resource.Resource;
import org.eclipse.jetty.util.resource.URLResource;
import org.eclipse.jetty.webapp.WebAppContext;
import org.osgi.framework.Bundle;
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Enumeration;
+
class WebAppBundleContext extends WebAppContext
{
public WebAppBundleContext(String contextPath, final Bundle bundle, final ClassLoader parent)
@@ -42,8 +42,8 @@
if (bundle.getState() == Bundle.ACTIVE) {
try {
return bundle.loadClass(s);
+ } catch (ClassNotFoundException e) {
}
- catch (ClassNotFoundException e) {}
}
return super.findClass(s);
}
@@ -61,7 +61,7 @@
}
@Override
- @SuppressWarnings({ "unchecked" })
+ @SuppressWarnings({"unchecked"})
protected Enumeration<URL> findResources(String name) throws IOException {
// Don't try to load resources from the bundle when it is not active
if (bundle.getState() == Bundle.ACTIVE) {
@@ -93,7 +93,7 @@
}
@Override
- public synchronized void close()
+ public synchronized void release()
{
if (this._in != null) {
// Do not close this input stream: it would invalidate
@@ -102,7 +102,7 @@
// "Inflater has been closed"
this._in = null;
}
- super.close();
+ super.release();
}
@Override
diff --git a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/WebEvent.java b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/WebEvent.java
index 1124417..b5e2cc0 100644
--- a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/WebEvent.java
+++ b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/WebEvent.java
@@ -16,13 +16,13 @@
*/
package org.apache.felix.http.jetty.internal;
-import java.util.Dictionary;
-import java.util.Hashtable;
-
import org.osgi.framework.Bundle;
import org.osgi.service.event.Event;
import org.osgi.service.event.EventConstants;
+import java.util.Dictionary;
+import java.util.Hashtable;
+
public abstract class WebEvent
{
private static final String TOPIC_WEB_EVENT = "org/osgi/service/web";
@@ -65,9 +65,9 @@
}
static Event FAILED(Bundle webAppBundle, Bundle extenderBundle, Throwable exception,
- String collision, Long collisionBundles)
+ String collision, Long collisionBundles)
{
- Dictionary<String, Object> props = createBaseProperties(webAppBundle, extenderBundle);
+ Dictionary<String,Object> props = createBaseProperties(webAppBundle, extenderBundle);
if (exception != null) {
props.put(EXCEPTION, exception);
}
@@ -80,7 +80,7 @@
return new Event(TOPIC_FAILED, props);
}
- private static Dictionary<String, Object> createBaseProperties(Bundle webAppBundle, Bundle extenderBundle)
+ private static Dictionary<String,Object> createBaseProperties(Bundle webAppBundle, Bundle extenderBundle)
{
Dictionary<String, Object> props = new Hashtable<String, Object>();
props.put(EventConstants.BUNDLE_SYMBOLICNAME, webAppBundle.getSymbolicName());
diff --git a/http/parent/pom.xml b/http/parent/pom.xml
index bacb215..248b6b3 100755
--- a/http/parent/pom.xml
+++ b/http/parent/pom.xml
@@ -39,6 +39,12 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <jetty.version>7.6.13.v20130916</jetty.version>
+ <cometd.version>2.7.0</cometd.version>
+ <http.service.version>1.2.0</http.service.version>
+ <servlet.version>2.5</servlet.version>
+
+ <http.api.version>2.0.4</http.api.version>
</properties>
<scm>
@@ -104,19 +110,19 @@
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
- <version>2.5</version>
+ <version>${servlet.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
- <version>4.0.0</version>
+ <version>4.2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.compendium</artifactId>
- <version>4.0.0</version>
+ <version>4.2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
diff --git a/http/proxy/pom.xml b/http/proxy/pom.xml
index 48e17ad..73d5e2f 100644
--- a/http/proxy/pom.xml
+++ b/http/proxy/pom.xml
@@ -28,7 +28,7 @@
<name>Apache Felix Http Proxy</name>
<artifactId>org.apache.felix.http.proxy</artifactId>
- <version>2.3.0-SNAPSHOT</version>
+ <version>2.2.2-SNAPSHOT</version>
<packaging>jar</packaging>
<scm>
diff --git a/http/samples/bridge/pom.xml b/http/samples/bridge/pom.xml
index e718180..ad4f3ca 100644
--- a/http/samples/bridge/pom.xml
+++ b/http/samples/bridge/pom.xml
@@ -28,7 +28,7 @@
<name>Apache Felix Http Samples - Bridge</name>
<artifactId>org.apache.felix.http.samples.bridge</artifactId>
- <version>2.3.0-SNAPSHOT</version>
+ <version>2.2.2-SNAPSHOT</version>
<packaging>war</packaging>
<scm>
@@ -119,29 +119,29 @@
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.framework</artifactId>
- <version>1.8.1</version>
+ <version>4.2.1</version>
</dependency>
<dependency>
- <groupId>${pom.groupId}</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.proxy</artifactId>
- <version>${pom.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
- <groupId>${pom.groupId}</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.bridge</artifactId>
- <version>${pom.version}</version>
+ <version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>${pom.groupId}</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.samples.filter</artifactId>
- <version>${pom.version}</version>
+ <version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>${pom.groupId}</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.webconsole</artifactId>
- <version>1.2.8</version>
+ <version>4.2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
diff --git a/http/samples/cometd/pom.xml b/http/samples/cometd/pom.xml
index 105f3b9..cfb26fa 100644
--- a/http/samples/cometd/pom.xml
+++ b/http/samples/cometd/pom.xml
@@ -28,7 +28,7 @@
<name>Apache Felix Http Samples - Cometd</name>
<artifactId>org.apache.felix.http.samples.cometd</artifactId>
- <version>2.3.0-SNAPSHOT</version>
+ <version>2.2.2-SNAPSHOT</version>
<packaging>jar</packaging>
<scm>
@@ -93,9 +93,9 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>${pom.groupId}</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.cometd</artifactId>
- <version>${pom.version}</version>
+ <version>${project.version}</version>
</dependency>
</dependencies>
diff --git a/http/samples/filter/pom.xml b/http/samples/filter/pom.xml
index 7daddfb..86819fc 100644
--- a/http/samples/filter/pom.xml
+++ b/http/samples/filter/pom.xml
@@ -28,7 +28,7 @@
<name>Apache Felix Http Samples - Filter</name>
<artifactId>org.apache.felix.http.samples.filter</artifactId>
- <version>2.3.0-SNAPSHOT</version>
+ <version>2.2.2-SNAPSHOT</version>
<packaging>jar</packaging>
<scm>
@@ -89,9 +89,9 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>${pom.groupId}</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.api</artifactId>
- <version>${pom.version}</version>
+ <version>${project.version}</version>
</dependency>
</dependencies>
diff --git a/http/samples/whiteboard/pom.xml b/http/samples/whiteboard/pom.xml
index fbd4567..b642798 100644
--- a/http/samples/whiteboard/pom.xml
+++ b/http/samples/whiteboard/pom.xml
@@ -28,7 +28,7 @@
<name>Apache Felix Http Samples - Whiteboard</name>
<artifactId>org.apache.felix.http.samples.whiteboard</artifactId>
- <version>2.3.0-SNAPSHOT</version>
+ <version>2.2.2-SNAPSHOT</version>
<packaging>jar</packaging>
<scm>
diff --git a/http/sslfilter/pom.xml b/http/sslfilter/pom.xml
index 0c2ef4ad..d29ad78 100644
--- a/http/sslfilter/pom.xml
+++ b/http/sslfilter/pom.xml
@@ -21,14 +21,14 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.felix</groupId>
- <artifactId>felix-parent</artifactId>
- <version>2.1</version>
- <relativePath>../../pom/pom.xml</relativePath>
+ <artifactId>org.apache.felix.http.parent</artifactId>
+ <version>2-SNAPSHOT</version>
+ <relativePath>../parent/pom.xml</relativePath>
</parent>
<name>Apache Felix Http SSL Filter</name>
<artifactId>org.apache.felix.http.sslfilter</artifactId>
- <version>0.1.0-SNAPSHOT</version>
+ <version>0.0.2-SNAPSHOT</version>
<packaging>bundle</packaging>
<scm>
@@ -36,20 +36,16 @@
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/felix/trunk/http/sslfilter</developerConnection>
<url>http://svn.apache.org/viewvc/felix/trunk/http/sslfilter/</url>
</scm>
+
+ <properties>
+ <felix.http.api.version>2.2.2-SNAPSHOT</felix.http.api.version>
+ </properties>
<build>
<plugins>
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- <plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
- <version>2.3.7</version>
<extensions>true</extensions>
<configuration>
<instructions>
@@ -57,7 +53,7 @@
org.apache.felix.http.sslfilter.internal.SslFilterActivator
</Bundle-Activator>
<Import-Package>
- javax.servlet.*;version="2.3",
+ javax.servlet.*;version=${servlet.version},
*
</Import-Package>
</instructions>
@@ -70,26 +66,22 @@
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
- <version>2.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
- <version>4.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.compendium</artifactId>
- <version>4.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.http.api</artifactId>
- <version>2.0.2</version>
- <scope>provided</scope>
+ <version>${felix.http.api.version}</version>
</dependency>
<!-- Test Dependencies -->
diff --git a/http/whiteboard/pom.xml b/http/whiteboard/pom.xml
index 41fe74c..c52fcb0 100644
--- a/http/whiteboard/pom.xml
+++ b/http/whiteboard/pom.xml
@@ -28,7 +28,7 @@
<name>Apache Felix Http Whiteboard</name>
<artifactId>org.apache.felix.http.whiteboard</artifactId>
- <version>2.3.0-SNAPSHOT</version>
+ <version>2.2.2-SNAPSHOT</version>
<packaging>jar</packaging>
<scm>
@@ -74,13 +74,13 @@
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.http.api</artifactId>
- <version>2.2.0</version>
+ <version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.http.base</artifactId>
- <version>2.2.0</version>
+ <version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>