You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2008/10/23 18:25:48 UTC

svn commit: r707408 [1/2] - in /servicemix/smx4/kernel/trunk: ./ assembly/ assembly/src/main/descriptors/ assembly/src/main/filtered-resources/etc/ gshell/ gshell/gshell-core/ gshell/gshell-core/src/main/filtered-resources/org/apache/geronimo/gshell/br...

Author: gnodet
Date: Thu Oct 23 09:25:46 2008
New Revision: 707408

URL: http://svn.apache.org/viewvc?rev=707408&view=rev
Log:
Rework gshell integration in gshell-core

Added:
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/filtered-resources/org/apache/servicemix/
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/filtered-resources/org/apache/servicemix/kernel/
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/filtered-resources/org/apache/servicemix/kernel/gshell/
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/filtered-resources/org/apache/servicemix/kernel/gshell/core/
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/filtered-resources/org/apache/servicemix/kernel/gshell/core/servicemix-version.properties
      - copied, changed from r707358, servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/filtered-resources/org/apache/geronimo/gshell/branding/servicemix-version.properties
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ApplicationImpl.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ApplicationManagerImpl.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/CommandBundle.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/GroupCommand.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ServiceMixBranding.java
      - copied, changed from r707358, servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/branding/ServiceMixBranding.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/SpringBeanContainerFactoryBean.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/commands/
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/commands/InfoAction.java
      - copied, changed from r707358, servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/commands/builtins/InfoCommand.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/config/
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/config/CommandParser.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/config/NamespaceHandler.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring.handlers
      - copied, changed from r707358, servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/filtered-resources/org/apache/geronimo/gshell/branding/servicemix-version.properties
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring.schemas
      - copied, changed from r707358, servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/filtered-resources/org/apache/geronimo/gshell/branding/servicemix-version.properties
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/org/apache/servicemix/
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/org/apache/servicemix/kernel/
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/org/apache/servicemix/kernel/gshell/
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/org/apache/servicemix/kernel/gshell/core/
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/org/apache/servicemix/kernel/gshell/core/commands/
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/org/apache/servicemix/kernel/gshell/core/commands.xml
      - copied, changed from r707358, servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-local.xml
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/org/apache/servicemix/kernel/gshell/core/commands/InfoAction.properties
      - copied, changed from r707358, servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/filtered-resources/org/apache/geronimo/gshell/branding/servicemix-version.properties
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/org/apache/servicemix/kernel/gshell/core/servicemix-gshell.xsd
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/test/java/org/apache/servicemix/
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/test/java/org/apache/servicemix/kernel/
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/test/java/org/apache/servicemix/kernel/gshell/
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/test/java/org/apache/servicemix/kernel/gshell/core/
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/test/java/org/apache/servicemix/kernel/gshell/core/Test.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/test/resources/log4j.properties
Removed:
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/filtered-resources/org/apache/geronimo/gshell/branding/servicemix-version.properties
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/branding/ServiceMixBranding.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/commands/builtins/ClearCommand.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/commands/builtins/EchoCommand.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/commands/builtins/ExitCommand.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/commands/builtins/HistoryCommand.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/commands/builtins/InfoCommand.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/commands/builtins/SetCommand.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/commands/builtins/SourceCommand.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/commands/builtins/UnsetCommand.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/commands/utils/CatCommand.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/commands/utils/ExecuteCommand.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/commands/utils/GrepCommand.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/commands/utils/JavaCommand.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/commands/utils/SleepCommand.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/remote/client/SpringRshClient.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/remote/client/SpringRshCommand.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/remote/client/proxy/SpringRemoteShellProxy.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/remote/server/handler/SpringCloseShellHandler.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/remote/server/handler/SpringExecuteHandler.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/remote/server/handler/SpringLoginHandler.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/remote/server/handler/SpringOpenShellHandler.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/EnvironmentTargetSource.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/GShell.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/NoCloseInputStream.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/NoCloseOutputStream.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/OsgiLayoutManager.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/Prompter.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/ProxyIO.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/ShellContext.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/SpringCommandExecutor.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/SpringCommandLineBuilder.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/SpringCommandRegistry.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/SpringRshServer.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/SubShellHelpCommand.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/spring/TerminalFactoryBean.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/support/OsgiCommandSupport.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/whisper/transport/SpringTransportFactoryLocator.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/whisper/transport/base/SpringBaseTransportFactory.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/whisper/transport/ssl/KeystoreSSLContextFactory.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/whisper/transport/ssl/SpringSslTransportFactory.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/whisper/transport/tcp/SpringTcpTransportFactory.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/whisper/transport/vm/SpringVmTransportFactory.java
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/test/java/org/apache/geronimo/gshell/spring/NoCloseInputStreamTest.java
Modified:
    servicemix/smx4/kernel/trunk/assembly/pom.xml
    servicemix/smx4/kernel/trunk/assembly/src/main/descriptors/unix-bin.xml
    servicemix/smx4/kernel/trunk/assembly/src/main/descriptors/windows-bin.xml
    servicemix/smx4/kernel/trunk/assembly/src/main/filtered-resources/etc/startup.properties
    servicemix/smx4/kernel/trunk/gshell/gshell-core/pom.xml
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-commands.xml
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-local.xml
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-osgi.xml
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-remote.xml
    servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell.xml
    servicemix/smx4/kernel/trunk/gshell/pom.xml
    servicemix/smx4/kernel/trunk/pom.xml

Modified: servicemix/smx4/kernel/trunk/assembly/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/assembly/pom.xml?rev=707408&r1=707407&r2=707408&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/assembly/pom.xml (original)
+++ servicemix/smx4/kernel/trunk/assembly/pom.xml Thu Oct 23 09:25:46 2008
@@ -54,6 +54,7 @@
             <groupId>org.apache.servicemix.kernel.gshell</groupId>
             <artifactId>org.apache.servicemix.kernel.gshell.core</artifactId>
         </dependency>
+        <!--
         <dependency>
             <groupId>org.apache.servicemix.kernel.gshell</groupId>
             <artifactId>org.apache.servicemix.kernel.gshell.admin</artifactId>
@@ -94,6 +95,7 @@
             <groupId>org.apache.servicemix.kernel.jaas</groupId>
             <artifactId>org.apache.servicemix.kernel.jaas.keystore</artifactId>
         </dependency>
+        -->
         <dependency>
             <groupId>org.springframework.osgi</groupId>
             <artifactId>spring-osgi-extender</artifactId>
@@ -155,6 +157,14 @@
             <artifactId>org.apache.servicemix.bundles.cglib</artifactId>
         </dependency>
         <dependency>
+            <groupId>org.apache.servicemix.bundles</groupId>
+            <artifactId>org.apache.servicemix.bundles.commons-jexl</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.bundles</groupId>
+            <artifactId>org.apache.servicemix.bundles.commons-vfs</artifactId>
+        </dependency>
+        <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.osgi.compendium</artifactId>
         </dependency>
@@ -186,6 +196,10 @@
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-servlet_2.5_spec</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-annotation_1.0_spec</artifactId>
+        </dependency>
     </dependencies>
     <build>
         <resources>

Modified: servicemix/smx4/kernel/trunk/assembly/src/main/descriptors/unix-bin.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/assembly/src/main/descriptors/unix-bin.xml?rev=707408&r1=707407&r2=707408&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/assembly/src/main/descriptors/unix-bin.xml (original)
+++ servicemix/smx4/kernel/trunk/assembly/src/main/descriptors/unix-bin.xml Thu Oct 23 09:25:46 2008
@@ -161,6 +161,7 @@
             <outputFileNameMapping>org/apache/geronimo/specs/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
             <includes>
                 <include>org.apache.geronimo.specs:geronimo-servlet_2.5_spec</include>
+                <include>org.apache.geronimo.specs:geronimo-annotation_1.0_spec</include>
             </includes>
         </dependencySet>
         <dependencySet>
@@ -172,6 +173,8 @@
                 <include>org.apache.servicemix.bundles:org.apache.servicemix.bundles.cglib</include>
                 <include>org.apache.servicemix.bundles:org.apache.servicemix.bundles.mina</include>
                 <include>org.apache.servicemix.bundles:org.apache.servicemix.bundles.jaxp-ri</include>
+                <include>org.apache.servicemix.bundles:org.apache.servicemix.bundles.commons-jexl</include>
+                <include>org.apache.servicemix.bundles:org.apache.servicemix.bundles.commons-vfs</include>
             </includes>
         </dependencySet>
         <dependencySet>

Modified: servicemix/smx4/kernel/trunk/assembly/src/main/descriptors/windows-bin.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/assembly/src/main/descriptors/windows-bin.xml?rev=707408&r1=707407&r2=707408&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/assembly/src/main/descriptors/windows-bin.xml (original)
+++ servicemix/smx4/kernel/trunk/assembly/src/main/descriptors/windows-bin.xml Thu Oct 23 09:25:46 2008
@@ -153,6 +153,7 @@
             <outputFileNameMapping>org/apache/geronimo/specs/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
             <includes>
                 <include>org.apache.geronimo.specs:geronimo-servlet_2.5_spec</include>
+                <include>org.apache.geronimo.specs:geronimo-annotation_1.0_spec</include>
             </includes>
         </dependencySet>
         <dependencySet>
@@ -164,6 +165,8 @@
                 <include>org.apache.servicemix.bundles:org.apache.servicemix.bundles.cglib</include>
                 <include>org.apache.servicemix.bundles:org.apache.servicemix.bundles.mina</include>
                 <include>org.apache.servicemix.bundles:org.apache.servicemix.bundles.jaxp-ri</include>
+                <include>org.apache.servicemix.bundles:org.apache.servicemix.bundles.commons-jexl</include>
+                <include>org.apache.servicemix.bundles:org.apache.servicemix.bundles.commons-vfs</include>
             </includes>
         </dependencySet>
         <dependencySet>

Modified: servicemix/smx4/kernel/trunk/assembly/src/main/filtered-resources/etc/startup.properties
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/assembly/src/main/filtered-resources/etc/startup.properties?rev=707408&r1=707407&r2=707408&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/assembly/src/main/filtered-resources/etc/startup.properties (original)
+++ servicemix/smx4/kernel/trunk/assembly/src/main/filtered-resources/etc/startup.properties Thu Oct 23 09:25:46 2008
@@ -38,9 +38,12 @@
 #
 # The rest of the services..
 #
+org/apache/geronimo/specs/geronimo-annotation_1.0_spec/${geronimo.annotation.version}/geronimo-annotation_1.0_spec-${geronimo.annotation.version}.jar=10
 org/apache/servicemix/bundles/org.apache.servicemix.bundles.aopalliance/${aopalliance.version}/org.apache.servicemix.bundles.aopalliance-${aopalliance.version}.jar=50
 org/apache/servicemix/bundles/org.apache.servicemix.bundles.cglib/${cglib.version}/org.apache.servicemix.bundles.cglib-${cglib.version}.jar=50
 org/apache/servicemix/bundles/org.apache.servicemix.bundles.mina/${mina.version}/org.apache.servicemix.bundles.mina-${mina.version}.jar=50
+org/apache/servicemix/bundles/org.apache.servicemix.bundles.commons-jexl/${commons.jexl.version}/org.apache.servicemix.bundles.commons-jexl-${commons.jexl.version}.jar=50
+org/apache/servicemix/bundles/org.apache.servicemix.bundles.commons-vfs/${commons.vfs.version}/org.apache.servicemix.bundles.commons-vfs-${commons.vfs.version}.jar=50
 org/springframework/spring-aop/${spring.version}/spring-aop-${spring.version}.jar=50
 org/springframework/spring-beans/${spring.version}/spring-beans-${spring.version}.jar=50
 org/springframework/spring-context/${spring.version}/spring-context-${spring.version}.jar=50

Modified: servicemix/smx4/kernel/trunk/gshell/gshell-core/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/pom.xml?rev=707408&r1=707407&r2=707408&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/pom.xml (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/pom.xml Thu Oct 23 09:25:46 2008
@@ -40,7 +40,11 @@
     <properties>
         <gshell.osgi.import>
             org.springframework.aop.framework,
+            org.springframework.beans.factory.annotation,
+            org.springframework.context.annotation,
             org.aopalliance.aop,
+            org.apache.commons.vfs.provider.temp,
+            org.apache.commons.vfs.provider.ram,
             org.apache.servicemix.kernel.jaas.config;resolution:=optional,
             org.apache.servicemix.kernel.main.spi;resolution:=optional;version="1.0.0",
             com.thoughtworks.xstream*;resolution:=optional,
@@ -50,14 +54,15 @@
             org.apache.mina*;resolution:=optional,
             *
         </gshell.osgi.import>
+        <!-- TODO: remove plexus util package -->
         <gshell.osgi.export>
-            org.apache.geronimo.gshell*;-split-package:=merge-first,
+            org.apache.geronimo.gshell*;version="1.0.0.alpha-2-SNAPSHOT";-split-package:=merge-first,
+            org.apache.servicemix.kernel.gshell.core*,
+            org.codehaus.plexus.interpolation*,
+            org.codehaus.plexus.util
         </gshell.osgi.export>
         <gshell.osgi.private>
             jline*,
-            org.apache.commons.jexl*,
-            org.codehaus.plexus.personality.plexus.lifecycle.phase*;-split-package:=merge-first,
-            org.codehaus.plexus.util*,
         </gshell.osgi.private>
     </properties>
 
@@ -79,48 +84,14 @@
             <artifactId>spring-osgi-core</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.apache.geronimo.gshell</groupId>
-            <artifactId>gshell-core</artifactId>
+            <groupId>org.apache.geronimo.gshell.commands</groupId>
+            <artifactId>gshell-builtins</artifactId>
+            <version>${gshell.version}</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.geronimo.gshell</groupId>
-            <artifactId>gshell-command-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.gshell.support</groupId>
-            <artifactId>gshell-common</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.gshell.support</groupId>
-            <artifactId>gshell-ansi</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.gshell.support</groupId>
-            <artifactId>gshell-i18n</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.gshell.support</groupId>
-            <artifactId>gshell-clp</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.gshell</groupId>
-            <artifactId>gshell-parser</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.gshell</groupId>
-            <artifactId>gshell-whisper</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.gshell.remote</groupId>
-            <artifactId>gshell-remote-client</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.gshell.remote</groupId>
-            <artifactId>gshell-remote-common</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.gshell.remote</groupId>
-            <artifactId>gshell-remote-server</artifactId>
+            <groupId>org.apache.geronimo.gshell.wisdom</groupId>
+            <artifactId>gshell-wisdom-core</artifactId>
+            <version>${gshell.version}</version>
         </dependency>
         <dependency>
             <groupId>jline</groupId>
@@ -337,4 +308,4 @@
             </plugin>
         </plugins>
     </build>
-</project>
\ No newline at end of file
+</project>

Copied: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/filtered-resources/org/apache/servicemix/kernel/gshell/core/servicemix-version.properties (from r707358, servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/filtered-resources/org/apache/geronimo/gshell/branding/servicemix-version.properties)
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/filtered-resources/org/apache/servicemix/kernel/gshell/core/servicemix-version.properties?p2=servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/filtered-resources/org/apache/servicemix/kernel/gshell/core/servicemix-version.properties&p1=servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/filtered-resources/org/apache/geronimo/gshell/branding/servicemix-version.properties&r1=707358&r2=707408&rev=707408&view=diff
==============================================================================
    (empty)

Added: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ApplicationImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ApplicationImpl.java?rev=707408&view=auto
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ApplicationImpl.java (added)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ApplicationImpl.java Thu Oct 23 09:25:46 2008
@@ -0,0 +1,111 @@
+/*
+ * 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.
+ */
+package org.apache.servicemix.kernel.gshell.core;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.InetAddress;
+
+import org.apache.geronimo.gshell.application.Application;
+import org.apache.geronimo.gshell.application.ClassPath;
+import org.apache.geronimo.gshell.io.IO;
+import org.apache.geronimo.gshell.command.Variables;
+import org.apache.geronimo.gshell.model.application.ApplicationModel;
+
+public class ApplicationImpl implements Application {
+
+    private String id;
+    private IO io;
+    private ApplicationModel model;
+    private Variables variables;
+    private InetAddress localHost;
+    private File homeDir;
+
+    public ApplicationImpl() throws Exception {
+        this.localHost = InetAddress.getLocalHost();
+        this.homeDir = detectHomeDir();
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public IO getIo() {
+        return io;
+    }
+
+    public void setIo(IO io) {
+        this.io = io;
+    }
+
+    public Variables getVariables() {
+        return variables;
+    }
+
+    public void setVariables(Variables variables) {
+        this.variables = variables;
+    }
+
+    public ApplicationModel getModel() {
+        return model;
+    }
+
+    public void setModel(ApplicationModel model) {
+        this.model = model;
+    }
+
+    public ClassPath getClassPath() {
+        throw new UnsupportedOperationException();
+    }
+
+    public File getHomeDir() {
+        if (homeDir == null) {
+            throw new IllegalStateException();
+        }
+        return homeDir;
+    }
+
+    public InetAddress getLocalHost() {
+        return localHost;
+    }
+
+    public String getUserName() {
+        return System.getProperty("user.name");
+    }
+
+    private File detectHomeDir() {
+        String homePath = System.getProperty("user.home");
+        // And now lets resolve this sucker
+        File dir;
+        try {
+            dir = new File(homePath).getCanonicalFile();
+        }
+        catch (IOException e) {
+            throw new RuntimeException("Failed to resolve home directory: " + homePath, e);
+        }
+        // And some basic sanity too
+        if (!dir.exists() || !dir.isDirectory()) {
+            throw new RuntimeException("Home directory configured but is not a valid directory: " + dir);
+        }
+
+        return dir;
+    }
+}

Added: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ApplicationManagerImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ApplicationManagerImpl.java?rev=707408&view=auto
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ApplicationManagerImpl.java (added)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ApplicationManagerImpl.java Thu Oct 23 09:25:46 2008
@@ -0,0 +1,173 @@
+/*
+ * 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.
+ */
+package org.apache.servicemix.kernel.gshell.core;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Proxy;
+import java.util.Arrays;
+
+import javax.annotation.PostConstruct;
+
+import org.apache.geronimo.gshell.application.ApplicationManager;
+import org.apache.geronimo.gshell.application.ApplicationConfiguration;
+import org.apache.geronimo.gshell.application.Application;
+import org.apache.geronimo.gshell.application.ApplicationSecurityManager;
+import org.apache.geronimo.gshell.shell.Shell;
+import org.apache.geronimo.gshell.spring.BeanContainerAware;
+import org.apache.geronimo.gshell.spring.BeanContainer;
+import org.apache.geronimo.gshell.wisdom.application.ShellCreatedEvent;
+import org.apache.geronimo.gshell.event.EventPublisher;
+import org.apache.geronimo.gshell.io.SystemOutputHijacker;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.NoSuchBeanDefinitionException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ApplicationManagerImpl implements ApplicationManager, ApplicationContextAware {
+
+    private final Logger log = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private EventPublisher eventPublisher;
+
+    @Autowired
+    private Application application;
+
+    private ApplicationContext applicationContext;
+
+    private boolean createLocalShell = true;
+
+    @PostConstruct
+    public void init() throws Exception {
+        if (!SystemOutputHijacker.isInstalled()) {
+            SystemOutputHijacker.install();
+        }
+        SystemOutputHijacker.register(application.getIo().outputStream, application.getIo().errorStream);
+        if (createLocalShell) {
+            new Thread("localShell") {
+                public void run() {
+                    Shell shell;
+                    try {
+                        shell = create();
+                        try {
+                            shell.run();
+                        } catch (Exception e2) {
+                            log.error("Error running shell", e2);
+                        }
+                    } catch (Exception e1) {
+                        log.error("Error creating shell", e1);
+                    }
+                }
+            }.start();
+        }
+    }
+
+    public void setApplicationContext(ApplicationContext applicationContext) {
+        this.applicationContext = applicationContext;
+    }
+
+    public void configure(ApplicationConfiguration applicationConfiguration) throws Exception {
+        throw new UnsupportedOperationException();
+    }
+
+    public Application getApplication() {
+        return application;
+    }
+
+    public Shell create() throws Exception {
+        final Shell shell = (Shell) getBean(Shell.class);
+
+        log.debug("Created shell instance: {}", shell);
+
+        InvocationHandler handler = new InvocationHandler()
+        {
+            //
+            // FIXME: Need to resolve how to handle the security manager for the application,
+            //        the SM is not thread-specific, but VM specific... so not sure this is
+            //        the right approache at all :-(
+            //
+
+            private final ApplicationSecurityManager sm = new ApplicationSecurityManager();
+
+            public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {
+                assert proxy != null;
+                assert method != null;
+                // args may be null
+
+                if (method.getDeclaringClass() == Object.class) {
+                    return method.invoke(this, args);
+                }
+
+                //
+                // TODO: This would be a good place to inject the shell or the shell context into a thread holder
+                //
+
+                final SecurityManager prevSM = System.getSecurityManager();
+                System.setSecurityManager(sm);
+                try {
+                    return method.invoke(shell, args);
+                }
+                catch (InvocationTargetException e) {
+                    throw e.getTargetException();
+                }
+                finally {
+                    System.setSecurityManager(prevSM);
+                }
+            }
+        };
+
+        ClassLoader cl = Thread.currentThread().getContextClassLoader();
+        Shell proxy = (Shell) Proxy.newProxyInstance(cl, new Class[] { Shell.class }, handler);
+
+        log.debug("Create shell proxy: {}", proxy);
+
+        eventPublisher.publish(new ShellCreatedEvent(proxy));
+
+        return proxy;
+    }
+
+    public <T> T getBean(Class<T> type) {
+        assert type != null;
+
+        log.trace("Getting bean of type: {}", type);
+
+        String[] names = applicationContext.getBeanNamesForType(type);
+
+        if (names.length == 0) {
+            throw new NoSuchBeanDefinitionException(type, "No bean defined for type: " + type);
+        }
+        if (names.length > 1) {
+            throw new NoSuchBeanDefinitionException(type, "No unique bean defined for type: " + type + ", found matches: " + Arrays.asList(names));
+        }
+
+        return getBean(names[0], type);
+    }
+
+    public <T> T getBean(String name, Class<T> requiredType) {
+        assert name != null;
+        assert requiredType != null;
+
+        log.trace("Getting bean named '{}' of type: {}", name, requiredType);
+
+        return (T) applicationContext.getBean(name, requiredType);
+    }
+
+}

Added: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/CommandBundle.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/CommandBundle.java?rev=707408&view=auto
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/CommandBundle.java (added)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/CommandBundle.java Thu Oct 23 09:25:46 2008
@@ -0,0 +1,79 @@
+package org.apache.servicemix.kernel.gshell.core;
+
+import java.util.Map;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+
+import org.springframework.osgi.context.BundleContextAware;
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.beans.factory.DisposableBean;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.AliasRegistry;
+import org.osgi.framework.BundleContext;
+import org.apache.geronimo.gshell.command.Command;
+import org.apache.geronimo.gshell.registry.CommandRegistry;
+
+public class CommandBundle implements BundleContextAware, InitializingBean, DisposableBean {
+
+    @Autowired(required = false)
+    private CommandRegistry commandRegistry;
+
+    @Autowired(required = false)
+    private AliasRegistry aliasRegistry;
+
+    private BundleContext bundleContext;
+
+    private Map<String,Command> commands;
+
+    private Map<String,String> aliases;
+
+    public CommandBundle() {
+    }
+
+    public Map<String, Command> getCommands() {
+        return commands;
+    }
+
+    public void setCommands(final Map<String, Command> commands) {
+        assert commands != null;
+
+        this.commands = commands;
+    }
+
+    public Map<String, String> getAliases() {
+        return aliases;
+    }
+
+    public void setAliases(final Map<String, String> aliases) {
+        assert aliases != null;
+
+        this.aliases = aliases;
+    }
+
+    public void setBundleContext(BundleContext bundleContext) {
+        this.bundleContext = bundleContext;
+    }
+
+    public void afterPropertiesSet() throws Exception {
+        System.err.println("CommandBundle: init");
+        if (commandRegistry != null) {
+            System.err.println("Using the auto wired command registry");
+            for (String name : commands.keySet()) {
+                System.err.println("Registering command: " + name);
+                commandRegistry.registerCommand(name, commands.get(name));
+            }
+        }
+        if (aliasRegistry != null) {
+            System.err.println("Using the auto wired alias registry");
+            for (String name : aliases.keySet()) {
+                aliasRegistry.registerAlias(name, aliases.get(name));
+            }
+        }
+    }
+
+    public void destroy() {
+        System.err.println("CommandBundle: init");
+    }
+
+}

Added: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/GroupCommand.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/GroupCommand.java?rev=707408&view=auto
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/GroupCommand.java (added)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/GroupCommand.java Thu Oct 23 09:25:46 2008
@@ -0,0 +1,31 @@
+package org.apache.servicemix.kernel.gshell.core;
+
+import org.apache.commons.vfs.FileObject;
+import org.apache.geronimo.gshell.command.CommandAction;
+import org.apache.geronimo.gshell.command.CommandContext;
+import org.apache.geronimo.gshell.registry.CommandResolver;
+
+public class GroupCommand extends org.apache.geronimo.gshell.wisdom.command.GroupCommand {
+
+    public GroupCommand(final FileObject file) {
+        super(file);
+        setAction(new GroupCommandAction());
+    }
+
+    private class GroupCommandAction
+        implements CommandAction
+    {
+        public Object execute(final CommandContext context) throws Exception {
+            assert context != null;
+
+            FileObject file = getFile();
+
+            log.debug("Changing to group: {}", file);
+
+            context.getVariables().parent().set(CommandResolver.GROUP, file);
+
+            return Result.SUCCESS;
+        }
+    }
+
+}

Copied: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ServiceMixBranding.java (from r707358, servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/branding/ServiceMixBranding.java)
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ServiceMixBranding.java?p2=servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ServiceMixBranding.java&p1=servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/branding/ServiceMixBranding.java&r1=707358&r2=707408&rev=707408&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/branding/ServiceMixBranding.java (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ServiceMixBranding.java Thu Oct 23 09:25:46 2008
@@ -14,43 +14,26 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.geronimo.gshell.branding;
+package org.apache.servicemix.kernel.gshell.core;
 
 import java.io.PrintWriter;
 import java.io.StringWriter;
 
-import jline.Terminal;
 import org.apache.geronimo.gshell.ansi.Buffer;
 import org.apache.geronimo.gshell.ansi.Code;
 import org.apache.geronimo.gshell.ansi.RenderWriter;
-import org.codehaus.plexus.util.StringUtils;
+import org.apache.geronimo.gshell.model.application.Branding;
 
-/**
- * Created by IntelliJ IDEA.
- * User: gnodet
- * Date: Oct 25, 2007
- * Time: 10:14:06 AM
- * To change this template use File | Settings | File Templates.
- */
-public class ServiceMixBranding extends BrandingSupport {
+public class ServiceMixBranding extends Branding {
 
     private static final String[] BANNER = {
-        " ____                  _          __  __ _       ",
+        " ____                  _          __  __ _      ",
         "/ ___|  ___ _ ____   _(_) ___ ___|  \\/  (_)_  __",
         "\\___ \\ / _ \\ '__\\ \\ / / |/ __/ _ \\ |\\/| | \\ \\/ /",
-        " ___) |  __/ |   \\ V /| | (_|  __/ |  | | |>  <",
+        " ___) |  __/ |   \\ V /| | (_|  __/ |  | | |>  < ",
         "|____/ \\___|_|    \\_/ |_|\\___\\___|_|  |_|_/_/\\_\\",
     };
 
-    private VersionLoader versionLoader;
-
-    private Terminal terminal;
-
-    public ServiceMixBranding(final VersionLoader versionLoader, final Terminal terminal) {
-        this.versionLoader = versionLoader;
-        this.terminal = terminal;
-    }
-
     public String getName() {
         return "servicemix";
     }
@@ -60,10 +43,10 @@
     }
 
     public String getProgramName() {
-        return System.getProperty("program.name", "gsh");
+        throw new UnsupportedOperationException();
     }
 
-    public String getAbout() {
+    public String getAboutMessage() {
         StringWriter writer = new StringWriter();
         PrintWriter out = new RenderWriter(writer);
 
@@ -74,11 +57,7 @@
         return writer.toString();
     }
 
-    public String getVersion() {
-        return versionLoader.getVersion();
-    }
-
-    public String getWelcomeBanner() {
+    public String getWelcomeMessage() {
         StringWriter writer = new StringWriter();
         PrintWriter out = new RenderWriter(writer);
         Buffer buff = new Buffer();
@@ -89,18 +68,11 @@
         }
 
         out.println();
-        out.println(" @|bold ServiceMix| (" + getVersion() + ")");
+        // TODO: get version
+        out.println(" @|bold ServiceMix| (" + "1.0.0" + ")");
         out.println();
         out.println("Type '@|bold help|' for more information.");
 
-        // If we can't tell, or have something bogus then use a reasonable default
-        int width = terminal.getTerminalWidth();
-        if (width < 1) {
-            width = 80;
-        }
-
-        out.print(StringUtils.repeat("-", width - 1));
-
         out.flush();
 
         return writer.toString();

Added: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/SpringBeanContainerFactoryBean.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/SpringBeanContainerFactoryBean.java?rev=707408&view=auto
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/SpringBeanContainerFactoryBean.java (added)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/SpringBeanContainerFactoryBean.java Thu Oct 23 09:25:46 2008
@@ -0,0 +1,131 @@
+/*
+ * 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.
+ */
+package org.apache.servicemix.kernel.gshell.core;
+
+import java.util.Map;
+import java.util.Collection;
+import java.util.Arrays;
+import java.net.URL;
+
+import org.springframework.beans.factory.FactoryBean;
+import org.springframework.beans.factory.NoSuchBeanDefinitionException;
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContextAware;
+import org.springframework.context.ApplicationContext;
+import org.apache.geronimo.gshell.spring.BeanContainer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SpringBeanContainerFactoryBean implements FactoryBean, ApplicationContextAware {
+
+    private ApplicationContext context;
+
+    public Object getObject() throws Exception {
+        return new Wrapper(context);
+    }
+
+    public Class getObjectType() {
+        return BeanContainer.class;
+    }
+
+    public boolean isSingleton() {
+        return true;
+    }
+
+    public void setApplicationContext(ApplicationContext context) throws BeansException {
+        this.context = context;
+    }
+
+    public static class Wrapper implements BeanContainer {
+
+        private final Logger log = LoggerFactory.getLogger(getClass());
+
+        private ApplicationContext context;
+
+        public Wrapper(ApplicationContext context) {
+            this.context = context;
+        }
+
+        public BeanContainer getParent() {
+            return null;
+        }
+
+        public ClassLoader getClassLoader() {
+            return context.getClassLoader();
+        }
+
+        public void loadBeans(String[] strings) throws Exception {
+            throw new UnsupportedOperationException();
+        }
+
+        public <T> T getBean(Class<T> type) {
+            assert type != null;
+
+            log.trace("Getting bean of type: {}", type);
+
+            String[] names = context.getBeanNamesForType(type);
+
+            if (names.length == 0) {
+                throw new NoSuchBeanDefinitionException(type, "No bean defined for type: " + type);
+            }
+            if (names.length > 1) {
+                throw new NoSuchBeanDefinitionException(type, "No unique bean defined for type: " + type + ", found matches: " + Arrays.asList(names));
+            }
+
+            return getBean(names[0], type);
+        }
+
+        public <T> T getBean(String name, Class<T> requiredType) {
+            assert name != null;
+            assert requiredType != null;
+
+            log.trace("Getting bean named '{}' of type: {}", name, requiredType);
+
+            return (T) context.getBean(name, requiredType);
+        }
+
+        public <T> Map<String, T> getBeans(Class<T> type) {
+            assert type != null;
+
+            log.trace("Getting beans of type: {}", type);
+
+            return (Map<String,T>) context.getBeansOfType(type);
+        }
+
+        public String[] getBeanNames() {
+            log.trace("Getting bean names");
+
+            return context.getBeanDefinitionNames();
+        }
+
+        public String[] getBeanNames(Class type) {
+            assert type != null;
+
+            log.trace("Getting bean names of type: {}", type);
+
+            return context.getBeanNamesForType(type);
+        }
+
+        public BeanContainer createChild(String s, Collection<URL> urls) {
+            throw new UnsupportedOperationException();
+        }
+
+        public BeanContainer createChild(String s) {
+            throw new UnsupportedOperationException();
+        }
+    }
+}

Copied: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/commands/InfoAction.java (from r707358, servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/commands/builtins/InfoCommand.java)
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/commands/InfoAction.java?p2=servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/commands/InfoAction.java&p1=servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/commands/builtins/InfoCommand.java&r1=707358&r2=707408&rev=707408&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/commands/builtins/InfoCommand.java (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/commands/InfoAction.java Thu Oct 23 09:25:46 2008
@@ -1,79 +1,51 @@
-/*
- * 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.
- */
-package org.apache.geronimo.gshell.commands.builtins;
+package org.apache.servicemix.kernel.gshell.core.commands;
 
+import java.lang.management.ThreadMXBean;
+import java.lang.management.OperatingSystemMXBean;
 import java.lang.management.ClassLoadingMXBean;
-import java.lang.management.GarbageCollectorMXBean;
 import java.lang.management.ManagementFactory;
 import java.lang.management.MemoryMXBean;
-import java.lang.management.OperatingSystemMXBean;
 import java.lang.management.RuntimeMXBean;
-import java.lang.management.ThreadMXBean;
+import java.lang.management.GarbageCollectorMXBean;
 import java.lang.reflect.Method;
+import java.text.NumberFormat;
 import java.text.DecimalFormat;
 import java.text.DecimalFormatSymbols;
-import java.text.NumberFormat;
-import java.util.HashMap;
 import java.util.Locale;
+import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.geronimo.gshell.ansi.Code;
+import org.apache.geronimo.gshell.command.CommandAction;
+import org.apache.geronimo.gshell.command.CommandContext;
 import org.apache.geronimo.gshell.ansi.Renderer;
-import org.apache.geronimo.gshell.branding.Branding;
-import org.apache.geronimo.gshell.command.annotation.CommandComponent;
-import org.apache.geronimo.gshell.command.annotation.Requirement;
-import org.apache.geronimo.gshell.support.OsgiCommandSupport;
+import org.apache.geronimo.gshell.ansi.Code;
+import org.apache.geronimo.gshell.model.application.Branding;
+import org.apache.geronimo.gshell.io.IO;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.codehaus.plexus.util.StringUtils;
 
-/**
- * Display environmental informations
- */
-@CommandComponent(id="gshell-builtins:info", description="Show system informations")
-public class InfoCommand
-    extends OsgiCommandSupport
-{
+public class InfoAction implements CommandAction {
 
-    @Requirement
+    @Autowired
     private Branding branding;
 
+    private IO io;
+
     private Renderer renderer = new Renderer();
     private NumberFormat fmtI = new DecimalFormat("###,###", new DecimalFormatSymbols(Locale.ENGLISH));
     private NumberFormat fmtD = new DecimalFormat("###,##0.000", new DecimalFormatSymbols(Locale.ENGLISH));
 
-    public InfoCommand(Branding branding) {
-        this.branding = branding;
-    }
-
-    @Override
-    protected OsgiCommandSupport createCommand() throws Exception {
-        return new InfoCommand(branding);
-    }
-
-    @Override
-    protected Object doExecute() throws Exception {
+    public Object execute(CommandContext context) throws Exception {
         int maxNameLen;
         String name;
         Map<String, String> props = new HashMap<String, String>();
 
-        RuntimeMXBean         runtime = ManagementFactory.getRuntimeMXBean();
+        RuntimeMXBean runtime = ManagementFactory.getRuntimeMXBean();
         OperatingSystemMXBean os = ManagementFactory.getOperatingSystemMXBean();
-        ThreadMXBean          threads = ManagementFactory.getThreadMXBean();
-        MemoryMXBean          mem = ManagementFactory.getMemoryMXBean();
-        ClassLoadingMXBean    cl = ManagementFactory.getClassLoadingMXBean();
+        ThreadMXBean threads = ManagementFactory.getThreadMXBean();
+        MemoryMXBean mem = ManagementFactory.getMemoryMXBean();
+        ClassLoadingMXBean cl = ManagementFactory.getClassLoadingMXBean();
+        io = context.getIo();
 
         //
         // print ServiceMix informations
@@ -82,7 +54,7 @@
         io.out.println("ServiceMix");
         printValue("ServiceMix home", maxNameLen, System.getProperty("servicemix.home"));
         printValue("ServiceMix base", maxNameLen, System.getProperty("servicemix.base"));
-        printValue("ServiceMix version", maxNameLen, branding.getVersion());
+        printValue("ServiceMix version", maxNameLen, branding.getParent().getVersion());
         io.out.println();
 
         io.out.println("JVM");

Added: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/config/CommandParser.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/config/CommandParser.java?rev=707408&view=auto
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/config/CommandParser.java (added)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/config/CommandParser.java Thu Oct 23 09:25:46 2008
@@ -0,0 +1,445 @@
+package org.apache.servicemix.kernel.gshell.core.config;
+
+import java.util.List;
+import java.util.Map;
+import java.util.LinkedHashMap;
+
+import org.w3c.dom.Element;
+
+import org.springframework.beans.factory.xml.AbstractBeanDefinitionParser;
+import org.springframework.beans.factory.xml.ParserContext;
+import org.springframework.beans.factory.xml.BeanDefinitionParserDelegate;
+import org.springframework.beans.factory.support.AbstractBeanDefinition;
+import org.springframework.beans.factory.support.BeanDefinitionBuilder;
+import org.springframework.beans.factory.support.ManagedList;
+import org.springframework.beans.factory.support.ManagedMap;
+import org.springframework.beans.factory.config.BeanDefinitionHolder;
+import org.springframework.beans.factory.config.BeanDefinition;
+import org.springframework.beans.factory.config.RuntimeBeanReference;
+import org.springframework.beans.factory.BeanDefinitionStoreException;
+import org.springframework.util.StringUtils;
+import org.springframework.util.xml.DomUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.geronimo.gshell.wisdom.command.ConfigurableCommandCompleter;
+import org.apache.geronimo.gshell.wisdom.command.LinkCommand;
+import org.apache.servicemix.kernel.gshell.core.CommandBundle;
+
+public class CommandParser extends AbstractBeanDefinitionParser {
+
+    public static final String ID = ID_ATTRIBUTE;
+
+    public static final String DESCRIPTION = "description";
+
+    public static final String PLUGIN_TEMPLATE = "pluginTemplate";
+
+    public static final String ACTION = "action";
+
+    public static final String ACTION_ID = "actionId";
+
+    public static final String COMMAND_TEMPLATE_SUFFIX = "CommandTemplate";
+
+    public static final String COMMAND_BUNDLE = "command-bundle";
+
+    public static final String NAME = "name";
+
+    public static final String COMMANDS = "commands";
+
+    public static final String COMMAND = "command";
+
+    public static final String TYPE = "type";
+
+    public static final String DOCUMENTER = "documenter";
+
+    public static final String COMPLETER = "completer";
+
+    public static final String COMPLETERS = "completers";
+
+    public static final String BEAN = "bean";
+
+    public static final String REF = "ref";
+
+    public static final String NULL = "null";
+
+    public static final String MESSAGE_SOURCE = "message-source";
+
+    public static final String MESSAGES = "messages";
+
+    public static final String PROTOTYPE = "prototype";
+
+    public static final String ALIAS = "alias";
+
+    public static final String ALIASES = "aliases";
+
+    public static final String LINK = "link";
+
+    public static final String TARGET = "target";
+
+    @Override
+    protected boolean shouldGenerateId() {
+        return true;
+    }
+
+    @Override
+    protected boolean shouldGenerateIdAsFallback() {
+        return true;
+    }
+
+    protected AbstractBeanDefinition parseInternal(final Element element, final ParserContext context) {
+        assert element != null;
+        assert context != null;
+
+        Builder builder = new Builder(context);
+        BeanDefinitionBuilder plugin = builder.parseCommandBundle(element);
+        return plugin.getBeanDefinition();
+    }
+
+    /**
+     * Helper to deal with command type.
+     */
+    private enum CommandType
+    {
+        STATELESS,
+        STATEFUL;
+
+        public static CommandType parse(final String text) {
+            assert text != null;
+
+            return valueOf(text.toUpperCase());
+        }
+
+        public String getTemplateName() {
+            return name().toLowerCase() + COMMAND_TEMPLATE_SUFFIX;
+        }
+
+        public void wire(final BeanDefinitionBuilder command, final BeanDefinitionHolder action) {
+            assert command != null;
+            assert action != null;
+
+            switch (this) {
+                case STATELESS:
+                    command.addPropertyReference(ACTION, action.getBeanName());
+                    break;
+
+                case STATEFUL:
+                    command.addPropertyValue(ACTION_ID, action.getBeanName());
+                    break;
+            }
+        }
+    }
+
+    /**
+     * Helper to build plugin related bean definitions.
+     */
+    private class Builder
+    {
+        private final Logger log = LoggerFactory.getLogger(getClass());
+
+        private ParserContext context;
+
+        public Builder(final ParserContext context) {
+            assert context != null;
+
+            this.context = context;
+        }
+
+        private String resolveId(final Element element, final BeanDefinition def) throws BeanDefinitionStoreException {
+            assert element != null;
+            assert def != null;
+
+            if (shouldGenerateId()) {
+                return context.getReaderContext().generateBeanName(def);
+            }
+
+            String id = element.getAttribute(ID_ATTRIBUTE);
+
+            if (!StringUtils.hasText(id) && shouldGenerateIdAsFallback()) {
+                id = context.getReaderContext().generateBeanName(def);
+            }
+
+            return id;
+        }
+
+        @SuppressWarnings({"unchecked"})
+        private List<Element> getChildElements(final Element element, final String name) {
+            assert element != null;
+            assert name != null;
+
+            return DomUtils.getChildElementsByTagName(element, name);
+        }
+
+        @SuppressWarnings({"unchecked"})
+        private List<Element> getChildElements(final Element element, final String[] names) {
+            assert element != null;
+            assert names != null;
+
+            return DomUtils.getChildElementsByTagName(element, names);
+        }
+
+        @SuppressWarnings({"unchecked"})
+        private Element getChildElement(final Element element, final String name) {
+            assert element != null;
+            assert name != null;
+
+            List<Element> elements = DomUtils.getChildElementsByTagName(element, name);
+            if (elements != null && !elements.isEmpty()) {
+                return elements.get(0);
+            }
+            return null;
+        }
+
+        private BeanDefinitionParserDelegate createBeanDefinitionParserDelegate(final Element element) {
+            assert element != null;
+
+            BeanDefinitionParserDelegate parser = new BeanDefinitionParserDelegate(context.getReaderContext());
+            parser.initDefaults(element.getOwnerDocument().getDocumentElement());
+            return parser;
+        }
+
+        private BeanDefinitionHolder parseBeanDefinitionElement(final Element element) {
+            assert element != null;
+
+            BeanDefinitionParserDelegate parser = createBeanDefinitionParserDelegate(element);
+            return parser.parseBeanDefinitionElement(element);
+        }
+
+        private void parseAndApplyDescription(final Element element, final BeanDefinition def) {
+            assert element != null;
+            assert def != null;
+
+            Element desc = getChildElement(element, DESCRIPTION);
+            if (desc != null) {
+                if (def instanceof AbstractBeanDefinition) {
+                    ((AbstractBeanDefinition)def).setDescription(desc.getTextContent());
+                }
+            }
+        }
+
+        private void parseAndApplyDescription(final Element element, final BeanDefinitionBuilder builder) {
+            assert element != null;
+            assert builder != null;
+
+            parseAndApplyDescription(element, builder.getRawBeanDefinition());
+        }
+
+        private BeanDefinitionHolder register(final BeanDefinitionHolder holder) {
+            assert holder != null;
+
+            registerBeanDefinition(holder, context.getRegistry());
+            return holder;
+        }
+
+        private BeanDefinitionHolder register(final BeanDefinition def, final String id) {
+            assert def != null;
+            assert id != null;
+
+            BeanDefinitionHolder holder = new BeanDefinitionHolder(def, id);
+            return register(holder);
+        }
+
+        //
+        // <gshell:command-bundle>
+        //
+
+        private BeanDefinitionBuilder parseCommandBundle(final Element element) {
+            assert element != null;
+
+            log.trace("Parse command bundle; element; {}", element);
+
+            BeanDefinitionBuilder bundle = BeanDefinitionBuilder.rootBeanDefinition(CommandBundle.class);
+            parseAndApplyDescription(element, bundle);
+
+            //
+            // TODO: Figure out how we can save the order of <gshell:command> and <gshell:link> so that 'help' displays them in the order they are defined
+            //
+
+            ManagedMap commands = new ManagedMap();
+            // noinspection unchecked
+            commands.putAll(parseCommands(element));
+            // noinspection unchecked
+            commands.putAll(parseLinks(element));
+            bundle.addPropertyValue(COMMANDS, commands);
+
+            ManagedMap aliases = new ManagedMap();
+            // noinspection unchecked
+            aliases.putAll(parseAliases(element));
+            bundle.addPropertyValue(ALIASES, aliases);
+
+            return bundle;
+        }
+
+        //
+        // <gshell:command>
+        //
+
+        private Map<String,BeanDefinition> parseCommands(final Element element) {
+            assert element != null;
+
+            log.trace("Parse commands; element; {}", element);
+
+            Map<String,BeanDefinition> commands = new LinkedHashMap<String,BeanDefinition>();
+
+            List<Element> children = getChildElements(element, COMMAND);
+
+            for (Element child : children) {
+                String name = child.getAttribute(NAME);
+                BeanDefinitionBuilder command = parseCommand(child);
+                commands.put(name, command.getBeanDefinition());
+            }
+
+            return commands;
+        }
+
+        private BeanDefinitionBuilder parseCommand(final Element element) {
+            assert element != null;
+
+            log.trace("Parse command; element; {}", element);
+
+            CommandType type = CommandType.parse(element.getAttribute(TYPE));
+            BeanDefinitionBuilder command = BeanDefinitionBuilder.childBeanDefinition(type.getTemplateName());
+            parseAndApplyDescription(element, command);
+
+            Element child;
+
+            // Required children elements
+
+            child = getChildElement(element, ACTION);
+            BeanDefinitionHolder action = parseCommandAction(child);
+            type.wire(command, action);
+
+            // Optional children elements
+
+            child = getChildElement(element, DOCUMENTER);
+            if (child != null) {
+                BeanDefinitionHolder holder = parseBeanDefinitionElement(child);
+                command.addPropertyValue(DOCUMENTER, holder.getBeanDefinition());
+            }
+
+            child = getChildElement(element, COMPLETER);
+            if (child != null) {
+                BeanDefinitionHolder holder = parseBeanDefinitionElement(child);
+                command.addPropertyValue(COMPLETER, holder.getBeanDefinition());
+            }
+
+            child = getChildElement(element, COMPLETERS);
+            if (child != null) {
+                BeanDefinitionBuilder completer = parseCommandCompleters(child);
+                command.addPropertyValue(COMPLETER, completer.getBeanDefinition());
+            }
+
+            child = getChildElement(element, MESSAGE_SOURCE);
+            if (child != null) {
+                BeanDefinitionHolder holder = parseBeanDefinitionElement(child);
+                command.addPropertyValue(MESSAGES, holder.getBeanDefinition());
+            }
+
+            //String id = resolveId(element, command.getBeanDefinition());
+            //BeanDefinitionHolder holder = register(command.getBeanDefinition(), id);
+
+            return command;
+        }
+
+        //
+        // <gshell:completers>
+        //
+
+        private BeanDefinitionBuilder parseCommandCompleters(final Element element) {
+            assert element != null;
+
+            BeanDefinitionBuilder completer = BeanDefinitionBuilder.rootBeanDefinition(ConfigurableCommandCompleter.class);
+
+            ManagedList completers = new ManagedList();
+
+            List<Element> children = getChildElements(element, new String[] {BEAN, REF, NULL});
+
+            for (Element child : children) {
+                if (DomUtils.nodeNameEquals(child, BEAN)) {
+                    BeanDefinitionHolder holder = parseBeanDefinitionElement(child);
+                    // noinspection unchecked
+                    completers.add(holder.getBeanDefinition());
+                }
+                else if (DomUtils.nodeNameEquals(child, REF)) {
+                    BeanDefinitionParserDelegate parser = createBeanDefinitionParserDelegate(child);
+                    RuntimeBeanReference ref = (RuntimeBeanReference) parser.parsePropertySubElement(child, completer.getRawBeanDefinition());
+                    // noinspection unchecked
+                    completers.add(ref);
+                }
+                else if (DomUtils.nodeNameEquals(child, NULL)) {
+                    // noinspection unchecked
+                    completers.add(null);
+                }
+            }
+
+            completer.addConstructorArgValue(completers);
+
+            return completer;
+        }
+
+        //
+        // <gshell:action>
+        //
+
+        private BeanDefinitionHolder parseCommandAction(final Element element) {
+            assert element != null;
+
+            log.trace("Parse command action; element; {}", element);
+
+            // Construct the action
+            BeanDefinition action = parseBeanDefinitionElement(element).getBeanDefinition();
+
+            // All actions are configured as prototypes
+            action.setScope(PROTOTYPE);
+
+            // Generate id and register the bean
+            String id = resolveId(element, action);
+            return register(action, id);
+        }
+
+        //
+        // <gshell:link>
+        //
+
+        private Map<String,BeanDefinition> parseLinks(final Element element) {
+            assert element != null;
+
+            log.trace("Parse links; element; {}", element);
+
+            Map<String,BeanDefinition> links = new LinkedHashMap<String,BeanDefinition>();
+
+            List<Element> children = getChildElements(element, LINK);
+
+            for (Element child : children) {
+                BeanDefinitionBuilder link = BeanDefinitionBuilder.rootBeanDefinition(LinkCommand.class);
+                link.addConstructorArgValue(child.getAttribute(TARGET));
+
+                String name = child.getAttribute(NAME);
+                links.put(name, link.getBeanDefinition());
+            }
+
+            return links;
+        }
+
+        //
+        // <gshell:alias>
+        //
+
+        private Map<String,String> parseAliases(final Element element) {
+            assert element != null;
+
+            log.trace("Parse aliases; element; {}", element);
+
+            Map<String,String> aliases = new LinkedHashMap<String,String>();
+
+            List<Element> children = getChildElements(element, ALIAS);
+
+            for (Element child : children) {
+                String name = child.getAttribute(NAME);
+                String alias = child.getAttribute(ALIAS);
+
+                aliases.put(name, alias);
+            }
+
+            return aliases;
+        }
+    }
+}

Added: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/config/NamespaceHandler.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/config/NamespaceHandler.java?rev=707408&view=auto
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/config/NamespaceHandler.java (added)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/config/NamespaceHandler.java Thu Oct 23 09:25:46 2008
@@ -0,0 +1,11 @@
+package org.apache.servicemix.kernel.gshell.core.config;
+
+import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
+
+public class NamespaceHandler extends NamespaceHandlerSupport {
+
+    public void init() {
+        registerBeanDefinitionParser(CommandParser.COMMAND_BUNDLE, new CommandParser());
+    }
+
+}

Copied: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring.handlers (from r707358, servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/filtered-resources/org/apache/geronimo/gshell/branding/servicemix-version.properties)
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring.handlers?p2=servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring.handlers&p1=servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/filtered-resources/org/apache/geronimo/gshell/branding/servicemix-version.properties&r1=707358&r2=707408&rev=707408&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/filtered-resources/org/apache/geronimo/gshell/branding/servicemix-version.properties (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring.handlers Thu Oct 23 09:25:46 2008
@@ -17,4 +17,8 @@
 ## under the License.
 ##
 
-version=${pom.version}
+##
+## $Rev: 697807 $ $Date: 2008-09-22 20:12:04 +0700 (Mon, 22 Sep 2008) $
+##
+
+http\://servicemix.apache.org/schema/servicemix-gshell=org.apache.servicemix.kernel.gshell.core.config.NamespaceHandler
\ No newline at end of file

Copied: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring.schemas (from r707358, servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/filtered-resources/org/apache/geronimo/gshell/branding/servicemix-version.properties)
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring.schemas?p2=servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring.schemas&p1=servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/filtered-resources/org/apache/geronimo/gshell/branding/servicemix-version.properties&r1=707358&r2=707408&rev=707408&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/filtered-resources/org/apache/geronimo/gshell/branding/servicemix-version.properties (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring.schemas Thu Oct 23 09:25:46 2008
@@ -17,4 +17,8 @@
 ## under the License.
 ##
 
-version=${pom.version}
+##
+## $Rev: 697807 $ $Date: 2008-09-22 20:12:04 +0700 (Mon, 22 Sep 2008) $
+##
+
+http\://servicemix.apache.org/schema/servicemix-gshell/servicemix-gshell.xsd=org/apache/servicemix/kernel/gshell/core/servicemix-gshell.xsd

Modified: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-commands.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-commands.xml?rev=707408&r1=707407&r2=707408&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-commands.xml (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-commands.xml Thu Oct 23 09:25:46 2008
@@ -20,12 +20,16 @@
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:util="http://www.springframework.org/schema/util"
+       xmlns:gshell="http://servicemix.apache.org/schema/servicemix-gshell"
        xsi:schemaLocation="
   http://www.springframework.org/schema/beans
   http://www.springframework.org/schema/beans/spring-beans.xsd
   http://www.springframework.org/schema/util
-  http://www.springframework.org/schema/util/spring-util.xsd">
+  http://www.springframework.org/schema/util/spring-util.xsd
+  http://servicemix.apache.org/schema/servicemix-gshell
+  http://servicemix.apache.org/schema/servicemix-gshell/servicemix-gshell.xsd">
 
+    <!--
     <bean id="clear" class="org.apache.geronimo.gshell.commands.builtins.ClearCommand">
         <constructor-arg ref="terminal" />
     </bean>
@@ -63,5 +67,87 @@
     <bean id="java" class="org.apache.geronimo.gshell.commands.utils.JavaCommand" />
 
     <bean id="sleep" class="org.apache.geronimo.gshell.commands.utils.SleepCommand" />
+    -->
+
+    <gshell:command-bundle>
+        <gshell:command name="about">
+            <gshell:action class="org.apache.geronimo.gshell.commands.builtins.AboutAction"/>
+        </gshell:command>
+
+        <gshell:command name="help">
+            <gshell:action class="org.apache.geronimo.gshell.commands.builtins.HelpAction"/>
+            <gshell:completers>
+                <bean class="org.apache.geronimo.gshell.console.completer.AggregateCompleter">
+                    <constructor-arg>
+                        <list>
+                            <ref bean="aliasNameCompleter"/>
+                            <ref bean="commandNameCompleter"/>
+                        </list>
+                    </constructor-arg>
+                </bean>
+                <null/>
+            </gshell:completers>
+        </gshell:command>
+
+        <gshell:command name="exit">
+            <gshell:action class="org.apache.geronimo.gshell.commands.builtins.ExitAction"/>
+        </gshell:command>
+
+        <gshell:link name="quit" target="exit"/>
+
+        <gshell:command name="echo">
+            <gshell:action class="org.apache.geronimo.gshell.commands.builtins.EchoAction"/>
+        </gshell:command>
+
+        <gshell:link name="print" target="echo"/>
+
+        <gshell:command name="printf">
+            <gshell:action class="org.apache.geronimo.gshell.commands.builtins.PrintfAction"/>
+        </gshell:command>
+
+        <gshell:command name="clear" type="stateless">
+            <gshell:action class="org.apache.geronimo.gshell.commands.builtins.ClearAction"/>
+        </gshell:command>
+
+        <gshell:command name="source">
+            <gshell:action class="org.apache.geronimo.gshell.commands.builtins.SourceAction"/>
+            <gshell:completers>
+                <ref bean="fileObjectNameCompleter"/>
+                <null/>
+            </gshell:completers>
+        </gshell:command>
+
+        <gshell:command name="set">
+            <gshell:action class="org.apache.geronimo.gshell.commands.builtins.SetAction"/>
+        </gshell:command>
+
+        <gshell:command name="unset">
+            <gshell:action class="org.apache.geronimo.gshell.commands.builtins.UnsetAction"/>
+            <gshell:completers>
+                <bean class="org.apache.geronimo.gshell.wisdom.completer.VariableNameCompleter"/>
+                <null/>
+            </gshell:completers>
+        </gshell:command>
+
+        <gshell:command name="alias">
+            <gshell:action class="org.apache.geronimo.gshell.commands.builtins.AliasAction"/>
+        </gshell:command>
+
+        <gshell:command name="unalias">
+            <gshell:action class="org.apache.geronimo.gshell.commands.builtins.UnaliasAction"/>
+            <gshell:completers>
+                <ref bean="aliasNameCompleter"/>
+                <null/>
+            </gshell:completers>
+        </gshell:command>
+
+        <gshell:command name="history">
+            <gshell:action class="org.apache.geronimo.gshell.commands.builtins.HistoryAction"/>
+        </gshell:command>
+
+        <gshell:command name="info">
+            <gshell:action class="org.apache.servicemix.kernel.gshell.core.commands.InfoAction" />
+        </gshell:command>
+    </gshell:command-bundle>
 
 </beans>
\ No newline at end of file

Modified: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-local.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-local.xml?rev=707408&r1=707407&r2=707408&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-local.xml (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-local.xml Thu Oct 23 09:25:46 2008
@@ -30,6 +30,7 @@
   http://www.springframework.org/schema/osgi/spring-osgi.xsd">
 
 
+    <!--
     <osgi:reference id="mainService" interface="org.apache.servicemix.kernel.main.spi.MainService" />
 
     <bean id="gshell" class="org.apache.geronimo.gshell.spring.GShell"
@@ -38,6 +39,6 @@
         <property name="start" value="${startLocalConsole}" />
         <property name="mainService" ref="mainService" />
     </bean>
-    
+    -->
 
 </beans>
\ No newline at end of file

Modified: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-osgi.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-osgi.xml?rev=707408&r1=707407&r2=707408&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-osgi.xml (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-osgi.xml Thu Oct 23 09:25:46 2008
@@ -32,6 +32,7 @@
   http://www.springframework.org/schema/osgi-compendium
   http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd">
 
+    <!--
     <osgi:list id="commands" interface="org.apache.geronimo.gshell.command.Command" cardinality="0..N">
         <osgi:listener ref="commandRegistry" bind-method="register" unbind-method="unregister" />
     </osgi:list>
@@ -145,5 +146,6 @@
             <prop key="serverTruststore">RshTruststore</prop>
         </osgix:default-properties>
     </osgix:property-placeholder>
+    -->
     
 </beans>
\ No newline at end of file

Modified: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-remote.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-remote.xml?rev=707408&r1=707407&r2=707408&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-remote.xml (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-remote.xml Thu Oct 23 09:25:46 2008
@@ -32,6 +32,7 @@
   http://servicemix.apache.org/jaas
   http://servicemix.apache.org/schema/servicemix-jaas.xsd">
 
+    <!--
     <bean id="rshServer" class="org.apache.geronimo.gshell.remote.server.RshServer" destroy-method="close">
         <constructor-arg ref="timeoutManager" />
         <constructor-arg ref="transportFactoryLocator" />
@@ -117,5 +118,6 @@
     <jaas:config id="RshServer" rank="-1">
         <jaas:module className="org.apache.geronimo.gshell.remote.server.auth.BogusLoginModule" flags="required" />
     </jaas:config>
+    -->
 
 </beans>
\ No newline at end of file