Revert changes for 3.0.2 releases

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1663118 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/http/jetty/pom.xml b/http/jetty/pom.xml
index 6642078..8618ce7 100644
--- a/http/jetty/pom.xml
+++ b/http/jetty/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.felix</groupId>
         <artifactId>org.apache.felix.http.parent</artifactId>
-        <version>6</version>
+        <version>7-SNAPSHOT</version>
         <relativePath>../parent/pom.xml</relativePath>
     </parent>
 
@@ -89,7 +89,7 @@
         <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.core</artifactId>
-            <version>5.0.0</version>
+            <version>6.0.0</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
@@ -150,12 +150,12 @@
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.http.api</artifactId>
-            <version>2.3.2</version>
+            <version>3.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.http.base</artifactId>
-            <version>2.4.0</version>
+            <version>3.0.0-SNAPSHOT</version>
         </dependency>
     </dependencies>
 
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 f0b7bca..df5263e 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
@@ -70,6 +70,7 @@
 import org.osgi.service.cm.ManagedService;
 import org.osgi.service.event.Event;
 import org.osgi.service.event.EventAdmin;
+import org.osgi.service.http.runtime.HttpServiceRuntimeConstants;
 import org.osgi.util.tracker.BundleTracker;
 import org.osgi.util.tracker.BundleTrackerCustomizer;
 import org.osgi.util.tracker.ServiceTracker;
@@ -79,8 +80,6 @@
 {
     /** PID for configuration of the HTTP service. */
     public static final String PID = "org.apache.felix.http";
-    /** Endpoint service registration property from RFC 189 */
-    private static final String REG_PROPERTY_ENDPOINTS = "osgi.http.service.endpoints";
 
     private static final String HEADER_WEB_CONTEXT_PATH = "Web-ContextPath";
     private static final String HEADER_ACTIVATION_POLICY = "Bundle-ActivationPolicy";
@@ -599,7 +598,7 @@
                 }
             }
         }
-        props.put(REG_PROPERTY_ENDPOINTS,
+        props.put(HttpServiceRuntimeConstants.HTTP_SERVICE_ENDPOINT_ATTRIBUTE,
                 endpoints.toArray(new String[endpoints.size()]));
     }
 
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 f8ab1ee..b1f2c41 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
@@ -48,9 +48,16 @@
 import org.apache.felix.http.jetty.internal.JettyService.Deployment;
 import org.eclipse.jetty.servlet.FilterHolder;
 import org.eclipse.jetty.servlet.ServletHolder;
+import org.mockito.Matchers;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.ServiceFactory;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.ServiceRegistration;
 import org.osgi.framework.Version;
+import org.osgi.service.http.context.ServletContextHelper;
+import org.osgi.service.http.runtime.HttpServiceRuntime;
 
 public class JettyServiceTest extends TestCase
 {
@@ -85,6 +92,19 @@
         when(mockBundle.getSymbolicName()).thenReturn("main");
         when(mockBundle.getVersion()).thenReturn(new Version("1.0.0"));
         when(mockBundle.getHeaders()).thenReturn(new Hashtable<String, String>());
+        final ServiceReference ref = mock(ServiceReference.class);
+        when(ref.getProperty(Constants.SERVICE_ID)).thenReturn(1L);
+        final ServiceRegistration reg = mock(ServiceRegistration.class);
+        when(reg.getReference()).thenReturn(ref);
+        when(mockBundleContext.registerService((Class<ServletContextHelper>)Matchers.isNotNull(),
+                (ServiceFactory<ServletContextHelper>)Matchers.any(ServiceFactory.class),
+                Matchers.any(Dictionary.class))).thenReturn(reg);
+        when(mockBundleContext.registerService(Matchers.<String[]>any(),
+                Matchers.any(ServiceFactory.class),
+                Matchers.any(Dictionary.class))).thenReturn(reg);
+        when(mockBundleContext.registerService((Class<HttpServiceRuntime>)Matchers.isNotNull(),
+                Matchers.any(HttpServiceRuntime.class),
+                Matchers.any(Dictionary.class))).thenReturn(reg);
 
         httpServiceController = new HttpServiceController(mockBundleContext);
         dispatcherServlet = new DispatcherServlet(httpServiceController);
@@ -138,11 +158,13 @@
         //Add a Filter to test whether the osgi-bundlecontext is available at init
         webAppBundleContext.addServlet(new ServletHolder(new Servlet()
         {
+            @Override
             public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException
             {
                 // Do Nothing
             }
 
+            @Override
             public void init(ServletConfig config) throws ServletException
             {
                 ServletContext context = config.getServletContext();
@@ -152,16 +174,19 @@
                 testLatch.countDown();
             }
 
+            @Override
             public String getServletInfo()
             {
                 return null;
             }
 
+            @Override
             public ServletConfig getServletConfig()
             {
                 return null;
             }
 
+            @Override
             public void destroy()
             {
                 // Do Nothing
@@ -170,6 +195,7 @@
 
         webAppBundleContext.addFilter(new FilterHolder(new Filter()
         {
+            @Override
             public void init(FilterConfig filterConfig) throws ServletException
             {
                 ServletContext context = filterConfig.getServletContext();
@@ -179,11 +205,13 @@
                 testLatch.countDown();
             }
 
+            @Override
             public void doFilter(ServletRequest arg0, ServletResponse response, FilterChain chain) throws IOException, ServletException
             {
                 // Do Nothing
             }
 
+            @Override
             public void destroy()
             {
                 // Do Nothing
@@ -200,4 +228,4 @@
             fail("Test Was not asserted");
         }
     }
-}
+}
\ No newline at end of file