Cleanup dependencies (FELIX-4482)

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1593206 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/manipulator/manipulator-it/pom.xml b/ipojo/manipulator/manipulator-it/pom.xml
index 0e31bcd..1be62eb 100644
--- a/ipojo/manipulator/manipulator-it/pom.xml
+++ b/ipojo/manipulator/manipulator-it/pom.xml
@@ -227,12 +227,6 @@
             <!--<version>1.11.1</version>-->
             <version>${project.version}</version>
             <scope>provided</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.osgi</groupId>
-                    <artifactId>org.osgi.core</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
 
         <dependency>
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/MetaAnnotationBindingRegistry.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/MetaAnnotationBindingRegistry.java
index dca7bce..43e1c52 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/MetaAnnotationBindingRegistry.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/MetaAnnotationBindingRegistry.java
@@ -82,7 +82,12 @@
             bytes = m_store.read(type.getInternalName().concat(".class"));
         } catch (IOException e) {
             // Annotation type cannot be read
-            m_reporter.trace("Could not read bytecode for @%s", type.getClassName());
+            m_reporter.trace("Could not read bytecode for @%s.", type.getClassName());
+            return emptyList();
+        } catch (IllegalStateException e) {
+            m_reporter.trace("Could not read bytecode for @%s because the bundle is not in a state allowing read " +
+                            "operations.",
+                    type.getClassName());
             return emptyList();
         }
         AnnotationParser parser = new AnnotationParser();
diff --git a/ipojo/runtime/api/pom.xml b/ipojo/runtime/api/pom.xml
index dbb0e59..ad514ce 100644
--- a/ipojo/runtime/api/pom.xml
+++ b/ipojo/runtime/api/pom.xml
@@ -114,11 +114,13 @@
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.ipojo</artifactId>
             <version>1.12.0-SNAPSHOT</version>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.ipojo.composite</artifactId>
             <version>1.12.0-SNAPSHOT</version>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.felix</groupId>
@@ -129,6 +131,7 @@
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.core</artifactId>
             <version>4.3.1</version>
+            <scope>provided</scope>
         </dependency>
     </dependencies>
 </project>
diff --git a/ipojo/runtime/composite-it/pom.xml b/ipojo/runtime/composite-it/pom.xml
index 80c3be3..19bf3c0 100644
--- a/ipojo/runtime/composite-it/pom.xml
+++ b/ipojo/runtime/composite-it/pom.xml
@@ -194,24 +194,14 @@
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.ipojo</artifactId>
             <version>1.12.0-SNAPSHOT</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.osgi</groupId>
-                    <artifactId>org.osgi.core</artifactId>
-                </exclusion>
-            </exclusions>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.ipojo.composite</artifactId>
             <version>1.12.0-SNAPSHOT</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.osgi</groupId>
-                    <artifactId>org.osgi.core</artifactId>
-                </exclusion>
-            </exclusions>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>
diff --git a/ipojo/runtime/composite/pom.xml b/ipojo/runtime/composite/pom.xml
index 5d531a5..8fefcf1 100644
--- a/ipojo/runtime/composite/pom.xml
+++ b/ipojo/runtime/composite/pom.xml
@@ -56,6 +56,7 @@
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.ipojo</artifactId>
             <version>1.12.0-SNAPSHOT</version>
+            <scope>provided</scope>
         </dependency>
     </dependencies>
     <build>
diff --git a/ipojo/runtime/core-it/ipojo-api-test/pom.xml b/ipojo/runtime/core-it/ipojo-api-test/pom.xml
index 65e21ac..1c3d7d1 100644
--- a/ipojo/runtime/core-it/ipojo-api-test/pom.xml
+++ b/ipojo/runtime/core-it/ipojo-api-test/pom.xml
@@ -38,32 +38,12 @@
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.ipojo.composite</artifactId>
             <version>1.12.0-SNAPSHOT</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.osgi</groupId>
-                    <artifactId>org.osgi.core</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.apache.felix</groupId>
-                    <artifactId>org.apache.felix.ipojo</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
 
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.ipojo.api</artifactId>
             <version>1.12.0-SNAPSHOT</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.apache.felix</groupId>
-                    <artifactId>org.osgi.core</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.apache.felix</groupId>
-                    <artifactId>org.apache.felix.ipojo</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
 
         <dependency>
diff --git a/ipojo/runtime/core-it/ipojo-core-declaration-test/pom.xml b/ipojo/runtime/core-it/ipojo-core-declaration-test/pom.xml
index a86450e..ef0ce20 100644
--- a/ipojo/runtime/core-it/ipojo-core-declaration-test/pom.xml
+++ b/ipojo/runtime/core-it/ipojo-core-declaration-test/pom.xml
@@ -43,24 +43,6 @@
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.ipojo.api</artifactId>
             <version>1.12.0-SNAPSHOT</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.apache.felix</groupId>
-                    <artifactId>org.osgi.core</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.osgi</groupId>
-                    <artifactId>org.osgi.core</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.apache.felix</groupId>
-                    <artifactId>org.apache.felix.ipojo</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.apache.felix</groupId>
-                    <artifactId>org.apache.felix.ipojo.composite</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
     </dependencies>
 </project>
\ No newline at end of file
diff --git a/ipojo/runtime/core-it/pom.xml b/ipojo/runtime/core-it/pom.xml
index 4fb3fff..53fd574 100644
--- a/ipojo/runtime/core-it/pom.xml
+++ b/ipojo/runtime/core-it/pom.xml
@@ -233,6 +233,7 @@
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.ipojo</artifactId>
             <version>1.12.0-SNAPSHOT</version>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>