FELIX-4550 - Upgrade to Jetty 9:
- applied patch from Stefan Seifert (= the improved patch from
Chetan Mehrotra);
- once again bumped Jetty version to latest: 9.2.6;
- bumped versions of individual projects;
- to do is checking whether JDK 1.7 is necessary for all sub-
projects.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1652026 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/http/base/pom.xml b/http/base/pom.xml
index ace1179..886b93b 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.3-SNAPSHOT</version>
+ <version>2.4.0-SNAPSHOT</version>
<packaging>jar</packaging>
<scm>
@@ -76,7 +76,7 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.api</artifactId>
- <version>${project.version}</version>
+ <version>${http.api.version}</version>
</dependency>
</dependencies>
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/context/ServletContextImpl.java b/http/base/src/main/java/org/apache/felix/http/base/internal/context/ServletContextImpl.java
index e35aa18..905bb03 100644
--- a/http/base/src/main/java/org/apache/felix/http/base/internal/context/ServletContextImpl.java
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/context/ServletContextImpl.java
@@ -140,6 +140,10 @@
this.context.declareRoles(roleNames);
}
+ public String getVirtualServerName() {
+ return context.getVirtualServerName();
+ }
+
public Object getAttribute(String name)
{
return (this.attributes != null) ? this.attributes.get(name) : this.context.getAttribute(name);
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/handler/FilterHandler.java b/http/base/src/main/java/org/apache/felix/http/base/internal/handler/FilterHandler.java
index aa8464d..793bea8 100644
--- a/http/base/src/main/java/org/apache/felix/http/base/internal/handler/FilterHandler.java
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/handler/FilterHandler.java
@@ -111,7 +111,7 @@
{
// FELIX-3988: If the response is not yet committed and still has the default
// status, we're going to override this and send an error instead.
- if (!res.isCommitted() && res.getStatus() == SC_OK)
+ if (!res.isCommitted() && (res.getStatus() == SC_OK || res.getStatus() == 0))
{
res.sendError(SC_FORBIDDEN);
}
diff --git a/http/base/src/test/java/org/apache/felix/http/base/internal/context/ServletContextImplTest.java b/http/base/src/test/java/org/apache/felix/http/base/internal/context/ServletContextImplTest.java
index 17b025d..8792cf4 100644
--- a/http/base/src/test/java/org/apache/felix/http/base/internal/context/ServletContextImplTest.java
+++ b/http/base/src/test/java/org/apache/felix/http/base/internal/context/ServletContextImplTest.java
@@ -185,6 +185,10 @@
{
}
+ public String getVirtualServerName() {
+ return null;
+ }
+
public Object getAttribute(String name)
{
return attributes.get(name);
diff --git a/http/bridge/pom.xml b/http/bridge/pom.xml
index 834c2a6..d65ace1 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.3-SNAPSHOT</version>
+ <version>2.4.0-SNAPSHOT</version>
<packaging>jar</packaging>
<scm>
@@ -84,12 +84,12 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.api</artifactId>
- <version>${project.version}</version>
+ <version>[2.0,3)</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.base</artifactId>
- <version>${project.version}</version>
+ <version>[2.4.0-SNAPSHOT,2.5)</version>
</dependency>
</dependencies>
diff --git a/http/bundle/pom.xml b/http/bundle/pom.xml
index 3592d41..4ae4c6e 100644
--- a/http/bundle/pom.xml
+++ b/http/bundle/pom.xml
@@ -107,22 +107,22 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.bridge</artifactId>
- <version>${project.version}</version>
+ <version>[2.4.0-SNAPSHOT,2.5)</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.cometd</artifactId>
- <version>${project.version}</version>
+ <version>[2.4.0-SNAPSHOT,2.5)</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.jetty</artifactId>
- <version>${project.version}</version>
+ <version>[3.0.0-SNAPSHOT,3.1)</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.whiteboard</artifactId>
- <version>${project.version}</version>
+ <version>[2.4.0-SNAPSHOT,2.5)</version>
</dependency>
</dependencies>
</project>
diff --git a/http/cometd/pom.xml b/http/cometd/pom.xml
index 0e2f6dc..bdada2f 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.3-SNAPSHOT</version>
+ <version>2.4.0-SNAPSHOT</version>
<packaging>jar</packaging>
<scm>
@@ -148,7 +148,7 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.base</artifactId>
- <version>${project.version}</version>
+ <version>[2.4.0-SNAPSHOT,2.5)</version>
</dependency>
<!-- The dependencies below are newer versions of the transitive
diff --git a/http/itest/pom.xml b/http/itest/pom.xml
index 7727530..234385d 100644
--- a/http/itest/pom.xml
+++ b/http/itest/pom.xml
@@ -1,99 +1,87 @@
-<!--
- 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!-- 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. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.http.parent</artifactId>
- <version>5-SNAPSHOT</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.http.parent</artifactId>
+ <version>5-SNAPSHOT</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
- <name>Apache Felix Http Integration Tests</name>
- <artifactId>org.apache.felix.http.itest</artifactId>
- <version>0.0.3-SNAPSHOT</version>
- <packaging>jar</packaging>
+ <name>Apache Felix Http Integration Tests</name>
+ <artifactId>org.apache.felix.http.itest</artifactId>
+ <version>0.0.3-SNAPSHOT</version>
+ <packaging>jar</packaging>
- <scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/felix/trunk/http/sslfilter</connection>
- <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>
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/felix/trunk/http/sslfilter</connection>
+ <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>
<pax.exam.version>2.6.0</pax.exam.version>
<pax.exam.plugin.version>1.2.4</pax.exam.plugin.version>
<pax.url.aether.version>2.1.0</pax.url.aether.version>
<pax.swissbox.version>1.7.0</pax.swissbox.version>
<pax.runner.version>1.7.6</pax.runner.version>
- </properties>
+ </properties>
- <dependencies>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.http.api</artifactId>
- <version>2.3.3-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.http.servlet-api</artifactId>
- <version>1.0.2-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.http.jetty</artifactId>
- <version>2.3.3-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.configadmin</artifactId>
- <version>1.8.0</version>
- </dependency>
+ <dependencies>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.compendium</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>org.apache.felix.http.api</artifactId>
+ <version>[2.0,3.0)</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>org.apache.felix.http.servlet-api</artifactId>
+ <version>[1.0,1.2)</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>org.apache.felix.http.jetty</artifactId>
+ <version>[3.0.0-SNAPSHOT,3.1)</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>org.apache.felix.configadmin</artifactId>
+ <version>1.8.0</version>
+ </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.8.2</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>1.8.2</version>
- <scope>test</scope>
- </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <version>1.8.2</version>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam-junit4</artifactId>
@@ -154,36 +142,28 @@
<version>1.6.0</version>
<scope>compile</scope>
</dependency>
- </dependencies>
+ </dependencies>
<build>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <target>1.6</target>
- <source>1.6</source>
- </configuration>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
</plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- </plugin>
- <plugin>
- <groupId>org.ops4j.pax.exam</groupId>
- <artifactId>maven-paxexam-plugin</artifactId>
+ <plugin>
+ <groupId>org.ops4j.pax.exam</groupId>
+ <artifactId>maven-paxexam-plugin</artifactId>
<version>1.2.4</version>
- <executions>
- <execution>
- <id>generate-config</id>
- <goals>
- <goal>generate-depends-file</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
+ <executions>
+ <execution>
+ <id>generate-config</id>
+ <goals>
+ <goal>generate-depends-file</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
diff --git a/http/itest/src/test/java/org/apache/felix/http/itest/HttpJettyConnectorTest.java b/http/itest/src/test/java/org/apache/felix/http/itest/HttpJettyConnectorTest.java
index 5daf8d6..943a6ba 100644
--- a/http/itest/src/test/java/org/apache/felix/http/itest/HttpJettyConnectorTest.java
+++ b/http/itest/src/test/java/org/apache/felix/http/itest/HttpJettyConnectorTest.java
@@ -20,13 +20,13 @@
import static org.junit.Assert.assertTrue;
-import java.io.IOException;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import org.apache.felix.http.jetty.ConnectorFactory;
-import org.eclipse.jetty.server.AbstractConnector;
import org.eclipse.jetty.server.Connector;
+import org.eclipse.jetty.server.LocalConnector;
+import org.eclipse.jetty.server.Server;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.junit.JUnit4TestRunner;
@@ -47,39 +47,24 @@
ConnectorFactory factory = new ConnectorFactory()
{
@Override
- public Connector createConnector()
+ public Connector createConnector(Server server)
{
- return new AbstractConnector()
+ return new LocalConnector(server)
{
@Override
- public void open() throws IOException
+ public void doStart() throws Exception
{
openLatch.countDown();
+ super.doStart();
}
@Override
- public int getLocalPort()
- {
- return 8070;
- }
-
- @Override
- public Object getConnection()
- {
- return null;
- }
-
- @Override
- public void close() throws IOException
+ public void doStop() throws Exception
{
closeLatch.countDown();
+ super.doStop();
}
- @Override
- protected void accept(int acceptorID) throws IOException, InterruptedException
- {
- // nop
- }
};
}
};
diff --git a/http/itest/src/test/java/org/apache/felix/http/itest/RequestDispatchTest.java b/http/itest/src/test/java/org/apache/felix/http/itest/RequestDispatchTest.java
index 6630525..57cc6f7 100644
--- a/http/itest/src/test/java/org/apache/felix/http/itest/RequestDispatchTest.java
+++ b/http/itest/src/test/java/org/apache/felix/http/itest/RequestDispatchTest.java
@@ -94,7 +94,7 @@
assertEquals("quu=qux", req.getQueryString());
}
- resp.getWriter().println("FORWARD");
+ resp.getWriter().print("FORWARD\n");
}
};
@@ -111,9 +111,9 @@
assertEquals("/test/foo", req.getRequestURI());
assertEquals("bar=qux&quu", req.getQueryString());
- resp.getWriter().println("NOT_SEND");
+ resp.getWriter().print("NOT_SEND\n");
req.getRequestDispatcher("/forward").forward(req, resp);
- resp.getWriter().println("NOT_SEND");
+ resp.getWriter().print("NOT_SEND\n");
}
};
@@ -162,7 +162,7 @@
assertEquals("/test/foo", req.getAttribute(FORWARD_REQUEST_URI));
assertEquals("bar=qux&quu", req.getAttribute(FORWARD_QUERY_STRING));
- resp.getWriter().println("FORWARD");
+ resp.getWriter().print("FORWARD\n");
}
else
{
@@ -172,7 +172,7 @@
assertEquals("/test/foo", req.getRequestURI());
assertEquals("bar=qux&quu", req.getQueryString());
- resp.getWriter().println("NOT_SEND");
+ resp.getWriter().print("NOT_SEND\n");
// ServletContext#getRequestDispatcher only takes absolute paths...
RequestDispatcher disp = req.getServletContext().getRequestDispatcher("forward");
@@ -182,7 +182,7 @@
assertNotNull("ServletRequest returned NO RequestDispatcher for relative path?!", disp);
disp.forward(req, resp);
- resp.getWriter().println("NOT_SEND");
+ resp.getWriter().print("NOT_SEND\n");
}
}
};
@@ -238,7 +238,7 @@
assertEquals("quu=qux", req.getQueryString());
}
- resp.getWriter().println("INCLUDE");
+ resp.getWriter().print("INCLUDE\n");
}
};
@@ -255,9 +255,9 @@
assertEquals("/test/foo", req.getRequestURI());
assertEquals("bar=qux&quu", req.getQueryString());
- resp.getWriter().println("BEFORE");
+ resp.getWriter().print("BEFORE\n");
req.getRequestDispatcher("/include").include(req, resp);
- resp.getWriter().println("AFTER");
+ resp.getWriter().print("AFTER\n");
}
};
@@ -306,7 +306,7 @@
// assertEquals("/test/include", req.getAttribute(INCLUDE_REQUEST_URI));
assertEquals(null, req.getAttribute(INCLUDE_QUERY_STRING));
- resp.getWriter().println("INCLUDE");
+ resp.getWriter().print("INCLUDE\n");
}
else
{
@@ -316,7 +316,7 @@
// assertEquals("/test/foo", req.getRequestURI());
assertEquals("bar=qux&quu", req.getQueryString());
- resp.getWriter().println("BEFORE");
+ resp.getWriter().print("BEFORE\n");
// ServletContext#getRequestDispatcher only takes absolute paths...
RequestDispatcher disp = req.getServletContext().getRequestDispatcher("include");
@@ -326,7 +326,7 @@
assertNotNull("ServletRequest returned NO RequestDispatcher for relative path?!", disp);
disp.include(req, resp);
- resp.getWriter().println("AFTER");
+ resp.getWriter().print("AFTER\n");
}
}
};
@@ -399,7 +399,7 @@
assertEquals("quu=qux", req.getQueryString());
}
- resp.getWriter().println("FORWARD");
+ resp.getWriter().print("FORWARD\n");
}
};
@@ -416,9 +416,9 @@
assertEquals("/context/test/foo", req.getRequestURI());
assertEquals("bar=qux&quu", req.getQueryString());
- resp.getWriter().println("NOT_SEND");
+ resp.getWriter().print("NOT_SEND\n");
req.getRequestDispatcher("/forward").forward(req, resp);
- resp.getWriter().println("NOT_SEND");
+ resp.getWriter().print("NOT_SEND\n");
}
};
@@ -475,7 +475,7 @@
assertEquals("quu=qux", req.getQueryString());
}
- resp.getWriter().println("INCLUDE");
+ resp.getWriter().print("INCLUDE\n");
}
};
@@ -492,9 +492,9 @@
assertEquals("/context/test/foo", req.getRequestURI());
assertEquals("bar=qux&quu", req.getQueryString());
- resp.getWriter().println("BEFORE");
+ resp.getWriter().print("BEFORE\n");
req.getRequestDispatcher("/include").include(req, resp);
- resp.getWriter().println("AFTER");
+ resp.getWriter().print("AFTER\n");
}
};
diff --git a/http/jetty/pom.xml b/http/jetty/pom.xml
index 1846af3..92a1e61 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.3-SNAPSHOT</version>
+ <version>3.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<scm>
@@ -132,12 +132,12 @@
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.http.api</artifactId>
- <version>${project.version}</version>
+ <version>[2.0,3.0)</version>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.http.base</artifactId>
- <version>${project.version}</version>
+ <version>[2.4.0-SNAPSHOT,2.5)</version>
</dependency>
</dependencies>
diff --git a/http/jetty/src/main/java/org/apache/felix/http/jetty/ConnectorFactory.java b/http/jetty/src/main/java/org/apache/felix/http/jetty/ConnectorFactory.java
index be5b5e8..29d1a67 100644
--- a/http/jetty/src/main/java/org/apache/felix/http/jetty/ConnectorFactory.java
+++ b/http/jetty/src/main/java/org/apache/felix/http/jetty/ConnectorFactory.java
@@ -21,6 +21,7 @@
import org.eclipse.jetty.server.Connector;
import aQute.bnd.annotation.ConsumerType;
+import org.eclipse.jetty.server.Server;
/**
* The <code>ConnectorFactory</code> is a service interface which allows
@@ -54,5 +55,5 @@
*
* @return A configured Jetty {@code Connector} instance.
*/
- Connector createConnector();
+ Connector createConnector(Server server);
}
diff --git a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/ConnectorFactoryTracker.java b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/ConnectorFactoryTracker.java
index f7940a7..59f98f2 100644
--- a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/ConnectorFactoryTracker.java
+++ b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/ConnectorFactoryTracker.java
@@ -51,7 +51,7 @@
public Object addingService(ServiceReference reference)
{
ConnectorFactory factory = (ConnectorFactory) super.addingService(reference);
- Connector connector = factory.createConnector();
+ Connector connector = factory.createConnector(server);
try
{
this.server.addConnector(connector);
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 106c828..4b056bc 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
@@ -82,12 +82,6 @@
/** Felix specific property to control whether to want or require HTTPS client certificates. Valid values are "none", "wants", "needs". Default is "none". */
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";
-
- /** 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";
-
/** 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";
@@ -350,11 +344,6 @@
return useHttp && getHttpPort() > 0;
}
- public boolean isUseHttpNio()
- {
- return getBooleanProperty(FELIX_HTTP_NIO, true);
- }
-
public boolean isSendServerHeader()
{
return getBooleanProperty(FELIX_JETTY_SEND_SERVER_HEADER, true);
@@ -371,11 +360,6 @@
return useHttps && getHttpsPort() > 0;
}
- public boolean isUseHttpsNio()
- {
- return getBooleanProperty(FELIX_HTTPS_NIO, isUseHttpNio());
- }
-
public void reset()
{
update(null);
@@ -507,8 +491,9 @@
}
}
}
-
- private int getSocketPort(int i) {
+
+ private int getSocketPort(int i)
+ {
int port = -1;
ServerSocket ss = null;
try
@@ -549,7 +534,7 @@
if (value instanceof String)
{
final String stringVal = ((String) value).trim();
- if ( stringVal.length() > 0 )
+ if (stringVal.length() > 0)
{
return new String[] { stringVal };
}
@@ -558,14 +543,14 @@
{
final String[] stringArr = (String[]) value;
final List<String> list = new ArrayList<String>();
- for(final String stringVal : stringArr)
+ for (final String stringVal : stringArr)
{
- if ( stringVal.trim().length() > 0 )
+ if (stringVal.trim().length() > 0)
{
list.add(stringVal.trim());
}
}
- if ( list.size() > 0 )
+ if (list.size() > 0)
{
return list.toArray(new String[list.size()]);
}
@@ -581,7 +566,7 @@
conv.add(String.valueOf(object));
}
}
- if ( conv.size() > 0 )
+ if (conv.size() > 0)
{
return conv.toArray(new String[conv.size()]);
}
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 fb8b873..7227da6 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
@@ -70,6 +70,12 @@
}
}
+ @Override
+ public void debug(String msg, long value)
+ {
+ debug(msg, value);
+ }
+
public void debug(String msg, Throwable throwable)
{
if (this.debugEnabled)
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 db48734..a7d8dc9 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
@@ -44,21 +44,24 @@
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.http.HttpVersion;
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.SecureRequestCustomizer;
import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.SessionManager;
-import org.eclipse.jetty.server.bio.SocketConnector;
+import org.eclipse.jetty.server.SslConnectionFactory;
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
import org.eclipse.jetty.server.handler.StatisticsHandler;
-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;
@@ -237,10 +240,6 @@
this.server = new Server();
this.server.addLifeCycleListener(this);
- // HTTP/1.1 requires Date header if possible (it is)
- this.server.setSendDateHeader(true);
- this.server.setSendServerVersion(this.config.isSendServerHeader());
-
this.server.addBean(new HashLoginService("OSGi HTTP Service Realm"));
this.parent = new ContextHandlerCollection();
@@ -314,55 +313,62 @@
private boolean initializeHttp()
{
- Connector connector = this.config.isUseHttpNio() ? new SelectChannelConnector() : new SocketConnector();
+ HttpConnectionFactory connFactory = new HttpConnectionFactory();
+ configureHttpConnectionFactory(connFactory);
+ ServerConnector connector = new ServerConnector(server, connFactory);
configureConnector(connector, this.config.getHttpPort());
return startConnector(connector);
}
private boolean initializeHttps()
{
- SslConnector connector = this.config.isUseHttpsNio() ? new SslSelectChannelConnector() : new SslSocketConnector();
+ HttpConnectionFactory connFactory = new HttpConnectionFactory();
+ configureHttpConnectionFactory(connFactory);
+
+ SslContextFactory sslContextFactory = new SslContextFactory();
+ configureSslContextFactory(sslContextFactory);
+
+ ServerConnector connector = new ServerConnector(server, new SslConnectionFactory(sslContextFactory, HttpVersion.HTTP_1_1.toString()), connFactory);
+ connFactory.getHttpConfiguration().addCustomizer(new SecureRequestCustomizer());
configureConnector(connector, this.config.getHttpsPort());
- configureSslConnector(connector);
return startConnector(connector);
}
- @SuppressWarnings("deprecation")
- private void configureSslConnector(final SslConnector connector)
+ private void configureSslContextFactory(final SslContextFactory connector)
{
if (this.config.getKeystoreType() != null)
{
- connector.setKeystoreType(this.config.getKeystoreType());
+ connector.setKeyStoreType(this.config.getKeystoreType());
}
if (this.config.getKeystore() != null)
{
- connector.setKeystore(this.config.getKeystore());
+ connector.setKeyStorePath(this.config.getKeystore());
}
if (this.config.getPassword() != null)
{
- connector.setPassword(this.config.getPassword());
+ connector.setKeyStorePassword(this.config.getPassword());
}
if (this.config.getKeyPassword() != null)
{
- connector.setKeyPassword(this.config.getKeyPassword());
+ connector.setKeyManagerPassword(this.config.getKeyPassword());
}
if (this.config.getTruststoreType() != null)
{
- connector.setTruststoreType(this.config.getTruststoreType());
+ connector.setTrustStoreType(this.config.getTruststoreType());
}
if (this.config.getTruststore() != null)
{
- connector.setTruststore(this.config.getTruststore());
+ connector.setTrustStorePath(this.config.getTruststore());
}
if (this.config.getTrustPassword() != null)
{
- connector.setTrustPassword(this.config.getTrustPassword());
+ connector.setTrustStorePassword(this.config.getTrustPassword());
}
if ("wants".equalsIgnoreCase(this.config.getClientcert()))
@@ -386,25 +392,45 @@
if (this.config.getIncludedProtocols() != null)
{
- connector.getSslContextFactory().setIncludeProtocols(this.config.getIncludedProtocols());
+ connector.setIncludeProtocols(this.config.getIncludedProtocols());
}
if (this.config.getExcludedProtocols() != null)
{
- connector.getSslContextFactory().setExcludeProtocols(this.config.getExcludedProtocols());
+ connector.setExcludeProtocols(this.config.getExcludedProtocols());
}
}
- private void configureConnector(final Connector connector, int port)
+ private void configureConnector(final ServerConnector connector, int port)
{
- connector.setMaxIdleTime(this.config.getHttpTimeout());
- connector.setRequestHeaderSize(this.config.getHeaderSize());
- connector.setRequestBufferSize(this.config.getRequestBufferSize());
- connector.setResponseHeaderSize(this.config.getHeaderSize());
- connector.setResponseBufferSize(this.config.getResponseBufferSize());
connector.setPort(port);
connector.setHost(this.config.getHost());
- connector.setStatsOn(this.config.isRegisterMBeans());
+ connector.setIdleTimeout(this.config.getHttpTimeout());
+
+ if (this.config.isRegisterMBeans())
+ {
+ connector.addBean(new ConnectorStatistics());
+ }
+ }
+
+ private void configureHttpConnectionFactory(HttpConnectionFactory connFactory)
+ {
+ HttpConfiguration config = connFactory.getHttpConfiguration();
+ config.setRequestHeaderSize(this.config.getHeaderSize());
+ config.setResponseHeaderSize(this.config.getHeaderSize());
+ config.setOutputBufferSize(this.config.getResponseBufferSize());
+
+ // HTTP/1.1 requires Date header if possible (it is)
+ config.setSendDateHeader(true);
+ config.setSendServerVersion(this.config.isSendServerHeader());
+ config.setSendXPoweredBy(this.config.isSendServerHeader());
+
+ connFactory.setInputBufferSize(this.config.getRequestBufferSize());
+
+ //Changed from 8.x to 9.x
+ //maxIdleTime -> ServerConnector.setIdleTimeout
+ //requestBufferSize -> HttpConnectionFactory.setInputBufferSize
+ //statsOn -> ServerConnector.addBean(new ConnectorStatistics());
}
private void configureSessionManager(final ServletContextHandler context)
@@ -414,7 +440,7 @@
manager.setMaxInactiveInterval(this.config.getSessionTimeout() * 60);
manager.setSessionIdPathParameterName(this.config.getProperty(SessionManager.__SessionIdPathParameterNameProperty, SessionManager.__DefaultSessionIdPathParameterName));
manager.setCheckingRemoteSessionIdEncoding(this.config.getBooleanProperty(SessionManager.__CheckRemoteSessionEncoding, true));
- manager.setSessionTrackingModes(Collections.singleton(SessionTrackingMode.COOKIE)); // XXX
+ manager.setSessionTrackingModes(Collections.singleton(SessionTrackingMode.COOKIE));
SessionCookieConfig cookieConfig = manager.getSessionCookieConfig();
cookieConfig.setName(this.config.getProperty(SessionManager.__SessionCookieProperty, SessionManager.__DefaultSessionCookie));
@@ -465,22 +491,32 @@
return getEndpoint(listener, address);
}
+ private ServerConnector getServerConnector(Connector connector)
+ {
+ if (connector instanceof ServerConnector)
+ {
+ return (ServerConnector) connector;
+ }
+ throw new IllegalArgumentException("Connection instance not of type ServerConnector " + connector);
+ }
+
private String getEndpoint(final Connector listener, final String hostname)
{
final StringBuilder sb = new StringBuilder();
sb.append("http");
int defaultPort = 80;
- if (listener instanceof SslConnector)
+ //SslConnectionFactory protocol is SSL-HTTP1.0
+ if (getServerConnector(listener).getDefaultProtocol().startsWith("SSL"))
{
sb.append('s');
defaultPort = 443;
}
sb.append("://");
sb.append(hostname);
- if (listener.getPort() != defaultPort)
+ if (getServerConnector(listener).getPort() != defaultPort)
{
sb.append(':');
- sb.append(String.valueOf(listener.getPort()));
+ sb.append(String.valueOf(getServerConnector(listener).getPort()));
}
sb.append(config.getContextPath());
@@ -517,7 +553,7 @@
{
final Connector connector = connectors[i];
- if (connector.getHost() == null)
+ if (getServerConnector(connector).getHost() == null)
{
try
{
@@ -554,7 +590,7 @@
}
else
{
- final String endpoint = this.getEndpoint(connector, connector.getHost());
+ final String endpoint = this.getEndpoint(connector, getServerConnector(connector).getHost());
if (endpoint != null)
{
endpoints.add(endpoint);
@@ -623,7 +659,7 @@
try
{
- context.getServletContext().setAttribute(OSGI_BUNDLE_CONTEXT, webAppBundle.getBundleContext());
+ context.getServletContext().setAttribute(OSGI_BUNDLE_CONTEXT, webAppBundle.getBundleContext());
JettyService.this.parent.addHandler(context);
context.start();
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 be0b16e..c74379e 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
@@ -42,7 +42,7 @@
{
MBeanServer server = (MBeanServer) super.addingService(reference);
MBeanContainer mBeanContainer = new MBeanContainer(server);
- this.server.getContainer().addEventListener(mBeanContainer);
+ this.server.addEventListener(mBeanContainer);
return mBeanContainer;
}
@@ -50,7 +50,7 @@
public void removedService(ServiceReference reference, Object service)
{
MBeanContainer mBeanContainer = (MBeanContainer) service;
- this.server.getContainer().removeEventListener(mBeanContainer);
+ this.server.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 548b18e..2bc4e52 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
@@ -106,7 +106,7 @@
}
@Override
- public synchronized void release()
+ public synchronized void close()
{
if (this._in != null)
{
@@ -116,7 +116,7 @@
// "Inflater has been closed"
this._in = null;
}
- super.release();
+ super.close();
}
@Override
diff --git a/http/jetty/src/main/java/org/apache/felix/http/jetty/package-info.java b/http/jetty/src/main/java/org/apache/felix/http/jetty/package-info.java
index 1bd6bbb..5f3570d 100644
--- a/http/jetty/src/main/java/org/apache/felix/http/jetty/package-info.java
+++ b/http/jetty/src/main/java/org/apache/felix/http/jetty/package-info.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-@Version("1.0")
+@Version("2.0")
package org.apache.felix.http.jetty;
import aQute.bnd.annotation.Version;
\ No newline at end of file
diff --git a/http/jetty/src/main/resources/OSGI-INF/metatype/metatype.properties b/http/jetty/src/main/resources/OSGI-INF/metatype/metatype.properties
index b9cba6c..e0d7ebe 100644
--- a/http/jetty/src/main/resources/OSGI-INF/metatype/metatype.properties
+++ b/http/jetty/src/main/resources/OSGI-INF/metatype/metatype.properties
@@ -91,15 +91,6 @@
clientcertificate.wants = Client Certficate Wanted
clientcertificate.needs = Client Certificate Needed
-org.apache.felix.http.nio.name = NIO for HTTP
-org.apache.felix.http.nio.description = Wether or not to use NIO for HTTP. \
- Defaults to true. Only used if HTTP is enabled.
-
-org.apache.felix.https.nio.name = NIO for HTTPS
-org.apache.felix.https.nio.description = Wether or not to use NIO for HTTP. \
- Defaults to the value of the NIO for HTTP property. Only used if HTTPS is \
- enabled.
-
org.apache.felix.http.mbeans.name = Register MBeans
org.apache.felix.http.mbeans.description = Whether or not to use register \
JMX MBeans from the servlet container (Jetty). If this is enabled \
diff --git a/http/jetty/src/main/resources/OSGI-INF/metatype/metatype.xml b/http/jetty/src/main/resources/OSGI-INF/metatype/metatype.xml
index 30340b7..ae4f4c7 100644
--- a/http/jetty/src/main/resources/OSGI-INF/metatype/metatype.xml
+++ b/http/jetty/src/main/resources/OSGI-INF/metatype/metatype.xml
@@ -22,11 +22,9 @@
<AD id="org.apache.felix.http.host" type="String" default="0.0.0.0" name="%org.apache.felix.http.host.name" description="%org.apache.felix.http.host.description"/>
<AD id="org.apache.felix.http.enable" type="Boolean" default="true" name="%org.apache.felix.http.enable.name" description="%org.apache.felix.http.enable.description"/>
<AD id="org.osgi.service.http.port" type="Integer" default="8080" name="%org.osgi.service.http.port.name" description="%org.osgi.service.http.port.description"/>
- <AD id="org.apache.felix.http.nio" type="Boolean" default="true" name="%org.apache.felix.http.nio.name" description="%org.apache.felix.http.nio.description"/>
<AD id="org.apache.felix.http.timeout" type="Integer" default="60000" name="%org.apache.felix.http.timeout.name" description="%org.apache.felix.http.timeout.description"/>
<AD id="org.apache.felix.https.enable" type="Boolean" default="false" name="%org.apache.felix.https.enable.name" description="%org.apache.felix.https.enable.description"/>
<AD id="org.osgi.service.http.port.secure" type="Integer" default="433" name="%org.osgi.service.http.port.secure.name" description="%org.osgi.service.http.port.secure.description"/>
- <AD id="org.apache.felix.https.nio" type="Boolean" default="true" name="%org.apache.felix.https.nio.name" description="%org.apache.felix.https.nio.description"/>
<AD id="org.apache.felix.https.keystore" type="String" name="%org.apache.felix.https.keystore.name" description="%org.apache.felix.https.keystore.description"/>
<AD id="org.apache.felix.https.keystore.password" type="String" name="%org.apache.felix.https.keystore.password.name" description="%org.apache.felix.https.keystore.password.description"/>
<AD id="org.apache.felix.https.keystore.key.password" type="String" name="%org.apache.felix.https.keystore.key.password.name" description="%org.apache.felix.https.keystore.key.password.description"/>
diff --git a/http/jetty/src/test/java/org/apache/felix/http/jetty/internal/JettyServiceTest.java b/http/jetty/src/test/java/org/apache/felix/http/jetty/internal/JettyServiceTest.java
index f0f23fa..9192d28 100644
--- a/http/jetty/src/test/java/org/apache/felix/http/jetty/internal/JettyServiceTest.java
+++ b/http/jetty/src/test/java/org/apache/felix/http/jetty/internal/JettyServiceTest.java
@@ -86,6 +86,11 @@
jettyService.start();
}
+ @Override
+ protected void tearDown() throws Exception {
+ jettyService.stop();
+ }
+
/**
*
* Tests to ensure the osgi-bundlecontext is available for init methods.
diff --git a/http/parent/pom.xml b/http/parent/pom.xml
index e62165e..06da681 100755
--- a/http/parent/pom.xml
+++ b/http/parent/pom.xml
@@ -38,13 +38,14 @@
</prerequisites>
<properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <jetty.version>8.1.14.v20131031</jetty.version>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <jetty.version>9.2.6.v20141205</jetty.version>
<cometd.version>2.8.0</cometd.version>
<http.service.version>1.2.1</http.service.version>
- <servlet.version>3.0.1</servlet.version>
+ <servlet.version>3.1.0</servlet.version>
<http.api.version>2.0.4</http.api.version>
+ <http.base.version>2.4.0</http.base.version>
</properties>
<scm>
@@ -58,9 +59,9 @@
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
- <source>1.5</source>
- <target>1.5</target>
- <compilerVersion>1.5</compilerVersion>
+ <source>1.7</source>
+ <target>1.7</target>
+ <compilerVersion>1.7</compilerVersion>
</configuration>
</plugin>
</plugins>
diff --git a/http/samples/bridge/pom.xml b/http/samples/bridge/pom.xml
index b40c08e..6db2dd2 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.3-SNAPSHOT</version>
+ <version>2.4.0-SNAPSHOT</version>
<packaging>war</packaging>
<scm>
@@ -124,18 +124,18 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.proxy</artifactId>
- <version>${project.version}</version>
+ <version>[2.3,2.4)</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.bridge</artifactId>
- <version>${project.version}</version>
+ <version>[2.4.0-SNAPSHOT,2.5)</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.samples.filter</artifactId>
- <version>${project.version}</version>
+ <version>[2.3,2.4)</version>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/http/samples/cometd/pom.xml b/http/samples/cometd/pom.xml
index 6f51106..3629b2b 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.3-SNAPSHOT</version>
+ <version>2.4.0-SNAPSHOT</version>
<packaging>jar</packaging>
<scm>
@@ -94,7 +94,7 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.cometd</artifactId>
- <version>${project.version}</version>
+ <version>[2.4.0-SNAPSHOT,2.5)</version>
</dependency>
</dependencies>
diff --git a/http/samples/filter/pom.xml b/http/samples/filter/pom.xml
index 5501398..d79769f 100644
--- a/http/samples/filter/pom.xml
+++ b/http/samples/filter/pom.xml
@@ -90,7 +90,7 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.api</artifactId>
- <version>${project.version}</version>
+ <version>[2.0,3.0)</version>
</dependency>
</dependencies>
diff --git a/http/samples/whiteboard/pom.xml b/http/samples/whiteboard/pom.xml
index c0ae749..d42a3cb 100644
--- a/http/samples/whiteboard/pom.xml
+++ b/http/samples/whiteboard/pom.xml
@@ -73,8 +73,9 @@
<dependencies>
<dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>org.apache.felix.http.servlet-api</artifactId>
+ <version>[1.0,1.2)</version>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/http/servlet-api/pom.xml b/http/servlet-api/pom.xml
index 819b7ec..e36e355 100644
--- a/http/servlet-api/pom.xml
+++ b/http/servlet-api/pom.xml
@@ -21,7 +21,7 @@
<name>Apache Felix Servlet API</name>
<description>Provides the Servlet API for use by applications</description>
<artifactId>org.apache.felix.http.servlet-api</artifactId>
- <version>1.0.2-SNAPSHOT</version>
+ <version>1.1.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<scm>
@@ -48,7 +48,12 @@
javax.servlet.annotation;
javax.servlet.descriptor;
javax.servlet.http;
- version=3.0
+ version=3.0,
+ javax.servlet;
+ javax.servlet.annotation;
+ javax.servlet.descriptor;
+ javax.servlet.http;
+ version=3.1
</Export-Package>
</instructions>
</configuration>
@@ -60,7 +65,7 @@
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-servlet-api</artifactId>
- <version>7.0.8</version>
+ <version>8.0.9</version>
</dependency>
</dependencies>
diff --git a/http/sslfilter/pom.xml b/http/sslfilter/pom.xml
index d6d6e52..c14565e 100644
--- a/http/sslfilter/pom.xml
+++ b/http/sslfilter/pom.xml
@@ -44,13 +44,6 @@
<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>
<extensions>true</extensions>
@@ -66,7 +59,7 @@
</Import-Package>
<DynamicImport-Package>
org.osgi.service.cm;version="[1.2,2)"
- </DynamicImport-Package>)
+ </DynamicImport-Package>
</instructions>
</configuration>
</plugin>
@@ -75,12 +68,6 @@
<dependencies>
<dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.http.servlet-api</artifactId>
- <version>1.0.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<scope>provided</scope>
@@ -91,9 +78,15 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.apache.felix</groupId>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>org.apache.felix.http.servlet-api</artifactId>
+ <version>[1.0,1.2)</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.api</artifactId>
- <version>2.3.3-SNAPSHOT</version>
+ <version>[2.0,3)</version>
</dependency>
<!-- Test Dependencies -->
diff --git a/http/sslfilter/src/test/java/org/apache/felix/http/sslfilter/internal/SslFilterResponseTest.java b/http/sslfilter/src/test/java/org/apache/felix/http/sslfilter/internal/SslFilterResponseTest.java
index cdb0488..cb0d4f4 100644
--- a/http/sslfilter/src/test/java/org/apache/felix/http/sslfilter/internal/SslFilterResponseTest.java
+++ b/http/sslfilter/src/test/java/org/apache/felix/http/sslfilter/internal/SslFilterResponseTest.java
@@ -42,7 +42,7 @@
{
private static final String BACKEND_SERVER = "backend.server";
private static final String OTHER_SERVER = "other.server";
-
+
private static final String PATH = "http://localhost:8080/";
private static final String DEFAULT_HTTP_PORT = "80";
@@ -213,6 +213,11 @@
throw new UnsupportedOperationException();
}
+ public void setContentLengthLong(long len)
+ {
+ throw new UnsupportedOperationException();
+ }
+
public void setCharacterEncoding(String charset)
{
throw new UnsupportedOperationException();
diff --git a/http/whiteboard/pom.xml b/http/whiteboard/pom.xml
index 4b394d7..304b888 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.3-SNAPSHOT</version>
+ <version>2.4.0-SNAPSHOT</version>
<packaging>jar</packaging>
<scm>
@@ -75,15 +75,15 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.apache.felix</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.api</artifactId>
- <version>${project.version}</version>
+ <version>[2.0,3)</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.apache.felix</groupId>
+ <groupId>${project.groupId}</groupId>
<artifactId>org.apache.felix.http.base</artifactId>
- <version>${project.version}</version>
+ <version>[2.4.0-SNAPSHOT,2.5)</version>
<scope>provided</scope>
</dependency>
<dependency>