Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titlegshell-config.xml
langxml
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:osgi="http://www.springframework.org/schema/osgi"
       xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
       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/osgi
  http://www.springframework.org/schema/osgi/spring-osgi.xsd
  http://www.springframework.org/schema/osgi-compendium
  http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd
  http://www.springframework.org/schema/util
  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">

    <import resource="classpath:org/apache/servicemix/kernel/gshell/core/commands.xml" />

    <gshell:command-bundle>
    
        <!-- Commands -->
        <gshell:command name="sample/hello">
            <gshell:action class="org.apache.servicemix.gshell.sample.HelloGShellCommand" />
        </gshell:command>

        <!-- add more commands here -->

        <!-- Links -->
        <gshell:link name="sample/hi" target="sample/hello" />

        <!-- add more links here -->
        
        <!-- Aliases -->
        <gshell:alias name="sample/hisayhi" alias="sample/hello" />

        <!-- add more aliases here -->
        
    </gshell:command-bundle>

</beans>

...

Code Block
servicemix> sample/hello
Executing Hello command

and for the aliaslink:

Code Block
servicemix> sample/hi
Executing Hello command

and for the alias:

Code Block

servicemix> sayhi
Executing Hello command

Yeah (smile)

...