Author: enolan
Date: Wed Feb 11 16:11:41 2009
New Revision: 743372

URL: http://svn.apache.org/viewvc?rev=743372&view=rev
Log:
Log: SMX4KNL-172 - the new command optional/cat from gshell can't support 
mvn/http protocol
LINK: https://issues.apache.org/activemq/browse/SMX4KNL-172

Modified:
    
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-commands.xml
    
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/test/java/org/apache/servicemix/kernel/gshell/core/Test.java

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=743372&r1=743371&r2=743372&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
 Wed Feb 11 16:11:41 2009
@@ -165,7 +165,9 @@
         </gshell:command>
 
         <gshell:command name="optional/cat">
-            <gshell:action 
class="org.apache.geronimo.gshell.commands.text.CatAction"/>
+            <gshell:action 
class="org.apache.geronimo.gshell.commands.text.CatAction">
+                <property name="fileSystemAccess" ref="fileSystemAccess"/>
+            </gshell:action>
             <gshell:completers>
                 <ref bean="fileObjectNameCompleter"/>
                 <null/>
@@ -173,7 +175,9 @@
         </gshell:command>
 
         <gshell:command name="optional/edit">
-            <gshell:action 
class="org.apache.geronimo.gshell.commands.shell.EditAction"/>
+            <gshell:action 
class="org.apache.geronimo.gshell.commands.shell.EditAction">
+                <property name="fileSystemAccess" ref="fileSystemAccess"/>
+            </gshell:action>
             <gshell:completers>
                 <ref bean="fileObjectNameCompleter"/>
                 <null/>
@@ -189,7 +193,9 @@
         </gshell:command>
 
         <gshell:command name="optional/find">
-            <gshell:action 
class="org.apache.geronimo.gshell.commands.shell.FindAction"/>
+            <gshell:action 
class="org.apache.geronimo.gshell.commands.shell.FindAction">
+                <property name="fileSystemAccess" ref="fileSystemAccess"/>
+            </gshell:action>
             <gshell:completers>
                 <ref bean="fileObjectNameCompleter"/>
                 <null/>

Modified: 
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/test/java/org/apache/servicemix/kernel/gshell/core/Test.java
URL: 
http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/test/java/org/apache/servicemix/kernel/gshell/core/Test.java?rev=743372&r1=743371&r2=743372&view=diff
==============================================================================
--- 
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/test/java/org/apache/servicemix/kernel/gshell/core/Test.java
 (original)
+++ 
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/test/java/org/apache/servicemix/kernel/gshell/core/Test.java
 Wed Feb 11 16:11:41 2009
@@ -129,4 +129,28 @@
         }
     }
 
+    public void testFileAccessCommands() throws Exception {
+        System.setProperty("startLocalConsole", "true");
+        System.setProperty("servicemix.name", "root");
+
+        ClassPathXmlApplicationContext context = null;
+        try {
+            context = new ClassPathXmlApplicationContext(
+                    new String[] { "META-INF/spring/gshell.xml",
+                                   "META-INF/spring/gshell-vfs.xml",
+                                   "META-INF/spring/gshell-commands.xml",
+                                   
"org/apache/servicemix/kernel/gshell/core/gshell-test.xml"});
+            ApplicationManager appMgr = (ApplicationManager) 
context.getBean("applicationManager");
+            assertNotNull(appMgr);
+            Shell shell = appMgr.create();            
+            assertNotNull(shell);
+            shell.execute("optional/cat 
src/test/resources/org/apache/servicemix/kernel/gshell/core/gshell-test.xml");
+            shell.execute("optional/find 
src/test/resources/org/apache/servicemix/kernel/gshell/core/gshell-test.xml");
+        } finally {
+            if (context != null) {
+                context.destroy();
+            }
+        }
+    }
+
 }


Reply via email to