Fix for FELIX-4125 and FELIX-4124

Move gogo commands to runtime project
Add components and component commands


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1492176 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/pom.xml b/ipojo/pom.xml
index e0debf5..4778d3b 100644
--- a/ipojo/pom.xml
+++ b/ipojo/pom.xml
@@ -46,7 +46,6 @@
 
         <!-- tools -->
         <module>arch</module>
-        <module>arch-gogo</module>
         <module>webconsole-plugin</module>
 
         <!-- distribution and tutorials -->
diff --git a/ipojo/arch-gogo/changelog.txt b/ipojo/runtime/ipojo-gogo-commands/changelog.txt
similarity index 100%
rename from ipojo/arch-gogo/changelog.txt
rename to ipojo/runtime/ipojo-gogo-commands/changelog.txt
diff --git a/ipojo/arch-gogo/obr.xml b/ipojo/runtime/ipojo-gogo-commands/obr.xml
similarity index 100%
rename from ipojo/arch-gogo/obr.xml
rename to ipojo/runtime/ipojo-gogo-commands/obr.xml
diff --git a/ipojo/arch-gogo/pom.xml b/ipojo/runtime/ipojo-gogo-commands/pom.xml
similarity index 87%
rename from ipojo/arch-gogo/pom.xml
rename to ipojo/runtime/ipojo-gogo-commands/pom.xml
index 1ef0e14..2d29213 100644
--- a/ipojo/arch-gogo/pom.xml
+++ b/ipojo/runtime/ipojo-gogo-commands/pom.xml
@@ -21,17 +21,16 @@
         <groupId>org.apache.felix</groupId>
         <artifactId>felix-parent</artifactId>
         <version>2.1</version>
-        <relativePath>../../pom/pom.xml</relativePath>
+        <relativePath>../../../pom/pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <packaging>bundle</packaging>
-    <name>Apache Felix iPOJO Arch Gogo Command</name>
-    <artifactId>org.apache.felix.ipojo.arch.gogo</artifactId>
-    <version>1.1.1-SNAPSHOT</version>
+    <name>Apache Felix iPOJO Gogo Command</name>
+    <artifactId>org.apache.felix.ipojo.gogo</artifactId>
+    <version>1.10.1-SNAPSHOT</version>
 
     <description>
-        Arch command to collect and print information about iPOJO instances.
-        This command is made for Gogo.
+        Provides commands for the Gogo shell to introspect the iPOJO ecosystem.
     </description>
     <url>
         http://felix.apache.org/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-tools/ipojo-arch-command.html
@@ -85,7 +84,7 @@
                         <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                         <Bundle-Vendor>The Apache Software Foundation</Bundle-Vendor>
                         <Bundle-Description>
-                            iPOJO Arch command for Gogo
+                            Gogo commands for iPOJO
                         </Bundle-Description>
                         <Bundle-DocURL>
                             http://felix.apache.org/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-tools/ipojo-arch-command.html
@@ -120,10 +119,4 @@
             </plugin>
         </plugins>
     </build>
-
-    <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/felix/trunk/ipojo/arch-gogo</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/felix/trunk/ipojo/arch-gogo</developerConnection>
-        <url>http://svn.apache.org/viewvc/felix/trunk/ipojo/arch-gogo</url>
-    </scm>
 </project>
diff --git a/ipojo/arch-gogo/src/main/appended-resources/META-INF/DEPENDENCIES b/ipojo/runtime/ipojo-gogo-commands/src/main/appended-resources/META-INF/DEPENDENCIES
similarity index 100%
rename from ipojo/arch-gogo/src/main/appended-resources/META-INF/DEPENDENCIES
rename to ipojo/runtime/ipojo-gogo-commands/src/main/appended-resources/META-INF/DEPENDENCIES
diff --git a/ipojo/arch-gogo/src/main/appended-resources/META-INF/NOTICE b/ipojo/runtime/ipojo-gogo-commands/src/main/appended-resources/META-INF/NOTICE
similarity index 100%
rename from ipojo/arch-gogo/src/main/appended-resources/META-INF/NOTICE
rename to ipojo/runtime/ipojo-gogo-commands/src/main/appended-resources/META-INF/NOTICE
diff --git a/ipojo/arch-gogo/src/main/java/org/apache/felix/ipojo/arch/gogo/Arch.java b/ipojo/runtime/ipojo-gogo-commands/src/main/java/org/apache/felix/ipojo/arch/gogo/Arch.java
similarity index 94%
rename from ipojo/arch-gogo/src/main/java/org/apache/felix/ipojo/arch/gogo/Arch.java
rename to ipojo/runtime/ipojo-gogo-commands/src/main/java/org/apache/felix/ipojo/arch/gogo/Arch.java
index 8b82a00..b396ed6 100644
--- a/ipojo/arch-gogo/src/main/java/org/apache/felix/ipojo/arch/gogo/Arch.java
+++ b/ipojo/runtime/ipojo-gogo-commands/src/main/java/org/apache/felix/ipojo/arch/gogo/Arch.java
@@ -65,7 +65,9 @@
         "instances",
         "instance",
         "factory",
+        "component",
         "factories",
+        "components",
         "handlers",
         "extensions"
     };
@@ -192,6 +194,17 @@
         }
 
     }
+
+    /**
+     * Displays the information about a specific factory.
+     * Note that factory name are not unique, so all matching
+     * factories are displayed.
+     * @param name the factory name
+     */
+    @Descriptor("Display the information about a specific factory / component")
+    public void component(@Descriptor("target factory name") String name) {
+        factory(name);
+    }
     
     /**
      * Displays the information about a specific factory.
@@ -248,6 +261,14 @@
         }
 
     }
+
+    /**
+     * Displays the list of public iPOJO factories.
+     */
+    @Descriptor("Display iPOJO factories / components")
+    public void components() {
+        factories();
+    }
     
     /**
      * Displays the list of public iPOJO factories.
diff --git a/ipojo/runtime/pom.xml b/ipojo/runtime/pom.xml
index 25ebc68..ea5f1b0 100644
--- a/ipojo/runtime/pom.xml
+++ b/ipojo/runtime/pom.xml
@@ -40,6 +40,7 @@
         <module>composite-it</module>
         <module>api</module>
         <module>api-it</module>
+        <module>ipojo-gogo-commands</module>
     </modules>
 
     <scm>