FELIX-1711 use official OSGi libraries as dependencies, control
imported and exported package versions (to be able to work with
R4.0 Framework and Configuration Admin). Remove own copy of the
ComponentConstants, add 4.1 new start/stop methods to MockBundle
(for unit tests only)

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@822622 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scr/pom.xml b/scr/pom.xml
index b4487f5..b204490 100644
--- a/scr/pom.xml
+++ b/scr/pom.xml
@@ -38,14 +38,14 @@
     </scm>
     <dependencies>
         <dependency>
-            <groupId>${pom.groupId}</groupId>
+            <groupId>org.osgi</groupId>
             <artifactId>org.osgi.core</artifactId>
-            <version>1.0.0</version>
+            <version>4.1.0</version>
         </dependency>
         <dependency>
-            <groupId>${pom.groupId}</groupId>
+            <groupId>org.osgi</groupId>
             <artifactId>org.osgi.compendium</artifactId>
-            <version>1.0.0</version>
+            <version>4.2.0</version>
         </dependency>
         <dependency>
             <groupId>${pom.groupId}</groupId>
@@ -107,16 +107,29 @@
                         </Bundle-Activator>
                         <Export-Package>
                             org.apache.felix.scr;version=${pom.version},
-                            org.osgi.service.component;version=1.0;-split-package:=merge-first
+                            org.osgi.service.component
                         </Export-Package>
                         <Private-Package>
                             org.apache.felix.scr.impl.*,
                             org.osgi.util.tracker
                         </Private-Package>
                         <Import-Package>
-                            org.osgi.service.cm;
+                            <!--
+                                The Felix Shell support is optional 
+                            -->
                             org.apache.felix.shell; resolution:=optional,
-                            *
+                            
+                            <!--
+                                Framework version 1.3 (from R4.0) is enough,
+                                the Bundle.getBundleContext method is guarded
+                            -->
+                            org.osgi.framework;version=1.3,
+                            
+                            <!--
+                                Configuration Admin is optional and if it is
+                                present, version 1.2 (from R4.0) is enough  
+                            -->
+                            org.osgi.service.cm;version=1.2;resolution:=optional
                         </Import-Package>
                         <DynamicImport-Package>
                             org.osgi.service.log
diff --git a/scr/src/main/java/org/osgi/service/component/ComponentConstants.java b/scr/src/main/java/org/osgi/service/component/ComponentConstants.java
deleted file mode 100644
index 2f77ce6..0000000
--- a/scr/src/main/java/org/osgi/service/component/ComponentConstants.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * $Header: /cvshome/build/org.osgi.service.component/src/org/osgi/service/component/ComponentConstants.java,v 1.14 2006/06/16 16:31:26 hargrave Exp $
- *
- * Copyright (c) OSGi Alliance (2004, 2006). All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.osgi.service.component;
-
-
-/**
- * Defines standard names for Service Component constants.
- *
- * @version $Revision$
- */
-public interface ComponentConstants
-{
-    /**
-     * Manifest header (named &quot;Service-Component&quot;) specifying the XML
-     * documents within a bundle that contain the bundle's Service Component
-     * descriptions.
-     * <p>
-     * The attribute value may be retrieved from the <code>Dictionary</code>
-     * object returned by the <code>Bundle.getHeaders</code> method.
-     */
-    public static final String SERVICE_COMPONENT = "Service-Component";
-
-    /**
-     * A component property for a component configuration that contains the name
-     * of the component as specified in the <code>name</code> attribute of the
-     * <code>component</code> element. The type of this property must be
-     * <code>String</code>.
-     */
-    public final static String COMPONENT_NAME = "component.name";
-
-    /**
-     * A component property that contains the generated id for a component
-     * configuration. The type of this property must be <code>Long</code>.
-     *
-     * <p>
-     * The value of this property is assigned by the Service Component Runtime
-     * when a component configuration is created. The Service Component Runtime
-     * assigns a unique value that is larger than all previously assigned values
-     * since the Service Component Runtime was started. These values are NOT
-     * persistent across restarts of the Service Component Runtime.
-     */
-    public final static String COMPONENT_ID = "component.id";
-
-    /**
-     * A service registration property for a Component Factory that contains the
-     * value of the <code>factory</code> attribute. The type of this property
-     * must be <code>String</code>.
-     */
-    public final static String COMPONENT_FACTORY = "component.factory";
-
-    /**
-     * The suffix for reference target properties. These properties contain the
-     * filter to select the target services for a reference. The type of this
-     * property must be <code>String</code>.
-     */
-    public final static String REFERENCE_TARGET_SUFFIX = ".target";
-
-    /**
-    * The reason the component instance was deactivated is unspecified.
-    *
-    * @since 1.1
-    */
-    public static final int DEACTIVATION_REASON_UNSPECIFIED = 0;
-
-    /**
-      * The component instance was deactivated because the component was disabled.
-      *
-      * @since 1.1
-      */
-    public static final int DEACTIVATION_REASON_DISABLED = 1;
-
-    /**
-      * The component instance was deactivated because a reference became unsatisfied.
-      *
-      * @since 1.1
-      */
-    public static final int DEACTIVATION_REASON_REFERENCE = 2;
-
-    /**
-     * The component instance was deactivated because its configuration was changed.
-     *
-     * @since 1.1
-     */
-    public static final int DEACTIVATION_REASON_CONFIGURATION_MODIFIED = 3;
-
-    /**
-     * The component instance was deactivated because its configuration was deleted.
-     *
-     * @since 1.1
-     */
-    public static final int DEACTIVATION_REASON_CONFIGURATION_DELETED = 4;
-
-    /**
-     * The component instance was deactivated because the component was disposed.
-     *
-     * @since 1.1
-     */
-    public static final int DEACTIVATION_REASON_DISPOSED = 5;
-
-    /**
-     * The component instance was deactivated because the bundle was stopped.
-     *
-     * @since 1.1
-     */
-    public static final int DEACTIVATION_REASON_BUNDLE_STOPPED = 6;
-}
diff --git a/scr/src/test/java/org/apache/felix/scr/impl/MockBundle.java b/scr/src/test/java/org/apache/felix/scr/impl/MockBundle.java
index ddc18eb..814893d 100644
--- a/scr/src/test/java/org/apache/felix/scr/impl/MockBundle.java
+++ b/scr/src/test/java/org/apache/felix/scr/impl/MockBundle.java
@@ -140,12 +140,24 @@
     }
 
 
+    public void start( int options )
+    {
+
+    }
+
+
     public void stop()
     {
 
     }
 
 
+    public void stop( int options )
+    {
+
+    }
+
+
     public void uninstall()
     {