Switch from spring-dm to blueprint
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@786262 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/karaf/gshell/gshell-run/pom.xml b/karaf/gshell/gshell-run/pom.xml
index 82f5ed0..27b06ca 100644
--- a/karaf/gshell/gshell-run/pom.xml
+++ b/karaf/gshell/gshell-run/pom.xml
@@ -68,7 +68,6 @@
<configuration>
<instructions>
<Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
- <Export-Package>${pom.artifactId}*;version=${project.version}</Export-Package>
<Import-Package>
org.apache.commons.vfs,
org.apache.commons.vfs.cache,
@@ -133,10 +132,9 @@
org.apache.sshd,
org.apache.sshd.server.keyprovider,
org.apache.sshd.server.jaas,
- org.springframework.beans.factory.config,
+ org.osgi.service.blueprint.container,
*
</Import-Package>
- <Spring-Context>*;publish-context:=false;create-asynchronously:=true</Spring-Context>
<_versionpolicy>${bnd.version.policy}</_versionpolicy>
</instructions>
</configuration>
diff --git a/karaf/gshell/gshell-run/src/main/resources/META-INF/spring/gshell-commands.xml b/karaf/gshell/gshell-run/src/main/resources/META-INF/spring/gshell-commands.xml
deleted file mode 100644
index 4ed2f90..0000000
--- a/karaf/gshell/gshell-run/src/main/resources/META-INF/spring/gshell-commands.xml
+++ /dev/null
@@ -1,285 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<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://servicemix.apache.org/schema/servicemix-gshell
- http://servicemix.apache.org/schema/servicemix-gshell/servicemix-gshell.xsd"
- default-autowire="no"
- default-dependency-check="none"
- default-init-method="init"
- default-destroy-method="destroy">
-
- <gshell:command-bundle>
- <gshell:command name="about">
- <gshell:action class="org.apache.geronimo.gshell.commands.builtin.AboutAction">
- <constructor-arg ref="application"/>
- </gshell:action>
- </gshell:command>
-
- <gshell:command name="help">
- <gshell:action class="org.apache.geronimo.gshell.commands.builtin.HelpAction">
- <constructor-arg ref="commandResolver"/>
- </gshell:action>
- <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.builtin.ExitAction"/>
- </gshell:command>
-
- <gshell:link name="quit" target="exit"/>
-
- <gshell:command name="echo">
- <gshell:action class="org.apache.geronimo.gshell.commands.builtin.EchoAction"/>
- </gshell:command>
-
- <gshell:command name="clear">
- <gshell:action class="org.apache.geronimo.gshell.commands.builtin.ClearAction"/>
- </gshell:command>
-
- <gshell:command name="source">
- <gshell:action class="org.apache.geronimo.gshell.commands.builtin.SourceAction">
- <constructor-arg ref="commandLineExecutor"/>
- <constructor-arg ref="fileSystemAccess"/>
- </gshell:action>
- <gshell:completers>
- <ref bean="fileObjectNameCompleter"/>
- <null/>
- </gshell:completers>
- </gshell:command>
-
- <gshell:command name="set">
- <gshell:action class="org.apache.geronimo.gshell.commands.builtin.SetAction"/>
- </gshell:command>
-
- <gshell:command name="unset">
- <gshell:action class="org.apache.geronimo.gshell.commands.builtin.UnsetAction"/>
- <gshell:completers>
- <ref bean="variableNameCompleter"/>
- <null/>
- </gshell:completers>
- </gshell:command>
-
- <gshell:command name="alias">
- <gshell:action class="org.apache.geronimo.gshell.commands.builtin.AliasAction">
- <constructor-arg ref="aliasRegistry"/>
- </gshell:action>
- </gshell:command>
-
- <gshell:command name="unalias">
- <gshell:action class="org.apache.geronimo.gshell.commands.builtin.UnaliasAction">
- <constructor-arg ref="aliasRegistry"/>
- </gshell:action>
- <gshell:completers>
- <ref bean="aliasNameCompleter"/>
- <null/>
- </gshell:completers>
- </gshell:command>
-
- <gshell:command name="history">
- <gshell:action class="org.apache.geronimo.gshell.commands.builtin.HistoryAction"/>
- </gshell:command>
-
- <gshell:command name="info">
- <gshell:action class="org.apache.felix.karaf.gshell.core.commands.InfoAction">
- <constructor-arg ref="branding" />
- </gshell:action>
- </gshell:command>
- </gshell:command-bundle>
-
- <gshell:command-bundle>
- <gshell:command name="ssh">
- <gshell:action class="org.apache.geronimo.gshell.commands.ssh.SshAction"/>
- </gshell:command>
-
- <gshell:command name="sshd">
- <gshell:action class="org.apache.geronimo.gshell.commands.ssh.SshServerAction"/>
- </gshell:command>
- </gshell:command-bundle>
-
- <gshell:command-bundle>
- <gshell:command name="exec">
- <gshell:action class="org.apache.geronimo.gshell.commands.shell.ExecuteAction"/>
- </gshell:command>
-
- <gshell:command name="java">
- <gshell:action class="org.apache.geronimo.gshell.commands.shell.JavaAction"/>
- </gshell:command>
-
- <gshell:command name="sleep">
- <gshell:action class="org.apache.geronimo.gshell.commands.shell.SleepAction"/>
- </gshell:command>
-
- <gshell:command name="date">
- <gshell:action class="org.apache.geronimo.gshell.commands.shell.DateAction"/>
- </gshell:command>
-
- <gshell:command name="edit">
- <gshell:action class="org.apache.geronimo.gshell.commands.shell.EditAction">
- <property name="fileSystemAccess" ref="fileSystemAccess"/>
- </gshell:action>
- <gshell:completers>
- <ref bean="fileObjectNameCompleter"/>
- <null/>
- </gshell:completers>
- </gshell:command>
-
- <gshell:command name="find">
- <gshell:action class="org.apache.geronimo.gshell.commands.shell.FindAction">
- <property name="fileSystemAccess" ref="fileSystemAccess"/>
- </gshell:action>
- <gshell:completers>
- <ref bean="fileObjectNameCompleter"/>
- <null/>
- </gshell:completers>
- </gshell:command>
-
- <gshell:command name="sort">
- <gshell:action class="org.apache.geronimo.gshell.commands.text.SortAction">
- <property name="fileSystemAccess" ref="fileSystemAccess"/>
- </gshell:action>
- <gshell:completers>
- <ref bean="fileObjectNameCompleter"/>
- <null/>
- </gshell:completers>
- </gshell:command>
- </gshell:command-bundle>
-
- <gshell:command-bundle>
- <gshell:command name="hostname">
- <gshell:action class="org.apache.geronimo.gshell.commands.network.HostnameAction"/>
- </gshell:command>
- </gshell:command-bundle>
-
- <gshell:command-bundle>
- <gshell:link name="print" target="echo"/>
-
- <gshell:command name="printf">
- <gshell:action class="org.apache.geronimo.gshell.commands.text.PrintfAction"/>
- </gshell:command>
-
- <gshell:command name="cat">
- <gshell:action class="org.apache.geronimo.gshell.commands.text.CatAction">
- <property name="fileSystemAccess" ref="fileSystemAccess"/>
- </gshell:action>
- <gshell:completers>
- <ref bean="fileObjectNameCompleter"/>
- <null/>
- </gshell:completers>
- </gshell:command>
-
- <gshell:command name="grep">
- <gshell:action class="org.apache.geronimo.gshell.commands.text.GrepAction"/>
- </gshell:command>
- </gshell:command-bundle>
-
- <gshell:command-bundle>
- <gshell:command name="cd">
- <gshell:action class="org.apache.geronimo.gshell.commands.file.ChangeDirectoryAction">
- <property name="fileSystemAccess" ref="fileSystemAccess"/>
- </gshell:action>
- <gshell:completers>
- <ref bean="fileObjectNameCompleter"/>
- <null/>
- </gshell:completers>
- </gshell:command>
-
- <gshell:command name="pwd">
- <gshell:action class="org.apache.geronimo.gshell.commands.file.CurrentDirectoryAction">
- <property name="fileSystemAccess" ref="fileSystemAccess"/>
- </gshell:action>
- </gshell:command>
-
- <gshell:command name="ls">
- <gshell:action class="org.apache.geronimo.gshell.commands.file.ListDirectoryAction">
- <property name="fileSystemAccess" ref="fileSystemAccess"/>
- </gshell:action>
- <gshell:completers>
- <ref bean="fileObjectNameCompleter"/>
- <null/>
- </gshell:completers>
- </gshell:command>
-
- <gshell:link name="dir" target="ls"/>
-
- <gshell:command name="cp">
- <gshell:action class="org.apache.geronimo.gshell.commands.file.CopyAction">
- <property name="fileSystemAccess" ref="fileSystemAccess"/>
- </gshell:action>
- <gshell:completers>
- <ref bean="fileObjectNameCompleter"/>
- <ref bean="fileObjectNameCompleter"/>
- <null/>
- </gshell:completers>
- </gshell:command>
-
- <gshell:link name="copy" target="cp"/>
-
- <gshell:command name="rm">
- <gshell:action class="org.apache.geronimo.gshell.commands.file.RemoveAction">
- <property name="fileSystemAccess" ref="fileSystemAccess"/>
- </gshell:action>
- <gshell:completers>
- <ref bean="fileObjectNameCompleter"/>
- <null/>
- </gshell:completers>
- </gshell:command>
-
- <gshell:link name="del" target="rm"/>
-
- <gshell:command name="fileinfo">
- <gshell:action class="org.apache.geronimo.gshell.commands.file.FileInfoAction">
- <property name="fileSystemAccess" ref="fileSystemAccess"/>
- </gshell:action>
- <gshell:completers>
- <ref bean="fileObjectNameCompleter"/>
- <null/>
- </gshell:completers>
- </gshell:command>
-
- <gshell:command name="touch">
- <gshell:action class="org.apache.geronimo.gshell.commands.file.TouchAction">
- <property name="fileSystemAccess" ref="fileSystemAccess"/>
- </gshell:action>
- <gshell:completers>
- <ref bean="fileObjectNameCompleter"/>
- <null/>
- </gshell:completers>
- </gshell:command>
- </gshell:command-bundle>
-
-</beans>
diff --git a/karaf/gshell/gshell-run/src/main/resources/META-INF/spring/gshell-local.xml b/karaf/gshell/gshell-run/src/main/resources/META-INF/spring/gshell-local.xml
deleted file mode 100644
index ed09d8f..0000000
--- a/karaf/gshell/gshell-run/src/main/resources/META-INF/spring/gshell-local.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<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:osgi="http://www.springframework.org/schema/osgi"
- 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/osgi
- http://www.springframework.org/schema/osgi/spring-osgi.xsd"
- default-autowire="no"
- default-dependency-check="none"
- default-init-method="init"
- default-destroy-method="destroy">
-
- <bean id="localShellWrapped" parent="shell" init-method="init" destroy-method="close"/>
-
- <bean id="localShell" class="org.apache.felix.karaf.gshell.core.ShellWrapper">
- <constructor-arg ref="localShellWrapped" />
- </bean>
-
- <bean id="localConsole" class="org.apache.felix.karaf.gshell.core.LocalConsole">
- <property name="bundleContext" ref="bundleContext"/>
- <property name="createLocalShell" value="${karaf.startLocalConsole}"/>
- <property name="shell" ref="localShell"/>
- </bean>
-
-</beans>
diff --git a/karaf/gshell/gshell-run/src/main/resources/META-INF/spring/gshell-osgi.xml b/karaf/gshell/gshell-run/src/main/resources/META-INF/spring/gshell-osgi.xml
deleted file mode 100644
index 588f5af..0000000
--- a/karaf/gshell/gshell-run/src/main/resources/META-INF/spring/gshell-osgi.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ctx="http://www.springframework.org/schema/context"
- 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"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context.xsd
- http://www.springframework.org/schema/util
- http://www.springframework.org/schema/util/spring-util.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"
- default-autowire="no"
- default-dependency-check="none"
- default-init-method="init"
- default-destroy-method="destroy">
-
- <bean id="osgiCommandRegistry" class="org.apache.felix.karaf.gshell.core.OsgiCommandRegistry">
- <constructor-arg ref="commandRegistry" />
- </bean>
-
- <bean id="osgiAliasRegistry" class="org.apache.felix.karaf.gshell.core.OsgiAliasRegistry">
- <constructor-arg ref="aliasRegistry" />
- </bean>
-
- <osgi:list id="osgiCommands" interface="org.apache.geronimo.gshell.command.Command" cardinality="0..N">
- <osgi:listener ref="osgiCommandRegistry" bind-method="register" unbind-method="unregister" />
- </osgi:list>
-
- <osgi:list id="osgiLinkCommands" interface="org.apache.geronimo.gshell.command.Link" cardinality="0..N">
- <osgi:listener ref="osgiCommandRegistry" bind-method="register" unbind-method="unregister" />
- </osgi:list>
-
- <osgi:list id="osgiAliases" interface="org.apache.geronimo.gshell.command.Alias" cardinality="0..N">
- <osgi:listener ref="osgiAliasRegistry" bind-method="register" unbind-method="unregister" />
- </osgi:list>
-
- <osgi:service ref="localShell" interface="org.apache.geronimo.gshell.shell.Shell">
- </osgi:service>
-
- <osgi:service ref="commandLineExecutor" interface="org.apache.geronimo.gshell.commandline.CommandLineExecutor">
- </osgi:service>
-
- <osgix:cm-properties id="cmProps" persistent-id="org.apache.felix.karaf.shell">
- <prop key="sshPort">8101</prop>
- <prop key="sshRealm">servicemix</prop>
- <prop key="hostKey">${karaf.base}/etc/host.key</prop>
- </osgix:cm-properties>
-
- <ctx:property-placeholder properties-ref="cmProps" />
-
-</beans>
diff --git a/karaf/gshell/gshell-run/src/main/resources/META-INF/spring/gshell-remote.xml b/karaf/gshell/gshell-run/src/main/resources/META-INF/spring/gshell-remote.xml
deleted file mode 100644
index e41e3fa..0000000
--- a/karaf/gshell/gshell-run/src/main/resources/META-INF/spring/gshell-remote.xml
+++ /dev/null
@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<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:osgi="http://www.springframework.org/schema/osgi"
- xmlns:jaas="http://servicemix.apache.org/jaas"
- 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/osgi
- http://www.springframework.org/schema/osgi/spring-osgi.xsd
- http://servicemix.apache.org/jaas
- http://servicemix.apache.org/schema/servicemix-jaas.xsd"
- default-autowire="no"
- default-dependency-check="none"
- default-init-method="init"
- default-destroy-method="destroy">
-
- <bean name="sshClient" class="org.apache.sshd.SshClient" factory-method="setUpDefaultClient" init-method="start" destroy-method="stop">
- </bean>
-
- <bean name="sshServer" class="org.apache.sshd.SshServer" factory-method="setUpDefaultServer" scope="prototype">
- <property name="port" value="${sshPort}" />
- <property name="shellFactory">
- <bean class="org.apache.geronimo.gshell.commands.ssh.ShellFactoryImpl">
- <property name="application" ref="application" />
- <property name="completers">
- <list>
- <ref bean="commandsCompleter"/>
- <ref bean="aliasNameCompleter"/>
- </list>
- </property>
- <property name="executor" ref="commandLineExecutor" />
- <property name="prompter">
- <bean class="org.apache.geronimo.gshell.wisdom.shell.ConsolePrompterImpl">
- <constructor-arg ref="application"/>
- </bean>
- </property>
- <property name="errorHandler">
- <bean class="org.apache.geronimo.gshell.wisdom.shell.ConsoleErrorHandlerImpl" />
- </property>
- <property name="history">
- <bean class="org.apache.geronimo.gshell.wisdom.shell.HistoryImpl">
- <constructor-arg ref="application"/>
- </bean>
- </property>
- </bean>
- </property>
- <property name="commandFactory">
- <bean class="org.apache.felix.karaf.gshell.core.sshd.ShellCommandFactory">
- <property name="executor" ref="commandLineExecutor" />
- </bean>
- </property>
- <property name="keyPairProvider" ref="keyPairProvider" />
- <property name="passwordAuthenticator" ref="passwordAuthenticator" />
- </bean>
-
- <bean name="keyPairProvider" class="org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider">
- <property name="path" value="${hostKey}" />
- </bean>
- <bean name="passwordAuthenticator" class="org.apache.sshd.server.jaas.JaasPasswordAuthenticator">
- <property name="domain" value="${sshRealm}" />
- </bean>
-
- <bean id="sshServerFactory" class="org.apache.felix.karaf.gshell.core.sshd.SshServerFactory" init-method="start" destroy-method="stop">
- <constructor-arg ref="sshServer" />
- <property name="start" value="${karaf.startRemoteShell}" />
- </bean>
-
- <!--
- <jaas:config id="SshServer" rank="-1">
- <jaas:module className="org.apache.geronimo.gshell.remote.server.auth.BogusLoginModule" flags="required" />
- </jaas:config>
- -->
-
-</beans>
diff --git a/karaf/gshell/gshell-run/src/main/resources/META-INF/spring/gshell.xml b/karaf/gshell/gshell-run/src/main/resources/META-INF/spring/gshell.xml
deleted file mode 100644
index a56b742..0000000
--- a/karaf/gshell/gshell-run/src/main/resources/META-INF/spring/gshell.xml
+++ /dev/null
@@ -1,155 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<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:osgi="http://www.springframework.org/schema/osgi"
- 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://servicemix.apache.org/schema/servicemix-gshell
- http://servicemix.apache.org/schema/servicemix-gshell/servicemix-gshell.xsd
- http://www.springframework.org/schema/osgi
- http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd"
- default-autowire="no"
- default-dependency-check="none"
- default-init-method="init"
- default-destroy-method="destroy">
-
- <bean id="io" class="org.apache.geronimo.gshell.io.IO">
- <property name="verbosity" value="DEBUG"/>
- </bean>
-
- <bean id="branding" class="org.apache.felix.karaf.gshell.core.DefaultBranding">
- <property name="prompt" value="@|bold %{gshell.username}|@%{application.id}:@|bold %{gshell.group}|> " />
- </bean>
-
- <bean id="application" class="org.apache.felix.karaf.gshell.core.ApplicationImpl" init-method="init">
- <property name="id" value="${karaf.name}"/>
- <property name="io" ref="io"/>
- <property name="model">
- <bean class="org.apache.geronimo.gshell.application.model.ApplicationModel">
- <property name="branding" ref="branding"/>
- </bean>
- </property>
- <property name="variables">
- <bean class="org.apache.geronimo.gshell.command.Variables"/>
- </property>
- </bean>
-
- <bean id="eventManager" class="org.apache.geronimo.gshell.event.EventManagerImpl"/>
-
- <bean id="applicationManager" class="org.apache.felix.karaf.gshell.core.ApplicationManagerImpl" init-method="init" destroy-method="destroy">
- <constructor-arg ref="eventManager" />
- <constructor-arg ref="application" />
- </bean>
-
- <bean id="commandLineParser" class="org.apache.geronimo.gshell.parser.CommandLineParser"/>
-
- <bean id="aliasRegistry" class="org.apache.geronimo.gshell.wisdom.registry.AliasRegistryImpl">
- <constructor-arg ref="eventManager"/>
- </bean>
-
- <bean id="aliasMetaMapper" class="org.apache.geronimo.gshell.wisdom.registry.AliasMetaMapper">
- <constructor-arg ref="eventManager"/>
- <constructor-arg ref="metaDataRegistry"/>
- <constructor-arg ref="aliasRegistry"/>
- </bean>
-
- <bean id="commandRegistry" class="org.apache.geronimo.gshell.wisdom.registry.CommandRegistryImpl">
- <constructor-arg ref="eventManager"/>
- </bean>
-
- <bean id="commandMetaMapper" class="org.apache.geronimo.gshell.wisdom.registry.CommandMetaMapper">
- <constructor-arg ref="eventManager"/>
- <constructor-arg ref="metaDataRegistry"/>
- <constructor-arg ref="commandRegistry"/>
- </bean>
-
- <bean id="groupDirResolver" class="org.apache.geronimo.gshell.wisdom.registry.GroupDirectoryResolver">
- <constructor-arg ref="fileSystemAccess"/>
- </bean>
-
- <bean id="commandResolver" class="org.apache.geronimo.gshell.wisdom.registry.CommandResolverImpl">
- <constructor-arg ref="fileSystemAccess"/>
- <constructor-arg ref="groupDirResolver"/>
- </bean>
-
- <bean class="org.apache.felix.karaf.gshell.core.WorkAroundAliasCommand" scope="prototype">
- <constructor-arg ref="commandLineExecutor"/>
- </bean>
-
- <bean class="org.apache.geronimo.gshell.wisdom.command.GroupCommand" scope="prototype"/>
-
- <bean id="commandLineBuilder" class="org.apache.geronimo.gshell.wisdom.shell.CommandLineBuilderImpl">
- <constructor-arg ref="commandLineParser"/>
- </bean>
-
- <bean id="commandLineExecutor" class="org.apache.geronimo.gshell.wisdom.shell.CommandLineExecutorImpl">
- <constructor-arg ref="commandResolver"/>
- <constructor-arg ref="commandLineBuilder"/>
- </bean>
-
- <bean id="shell" class="org.apache.geronimo.gshell.wisdom.shell.ShellImpl" scope="prototype" init-method="init" destroy-method="close">
- <constructor-arg ref="application"/>
- <constructor-arg ref="commandLineExecutor"/>
-
- <property name="completers">
- <list>
- <ref bean="commandsCompleter"/>
- <ref bean="aliasNameCompleter"/>
- </list>
- </property>
- <property name="prompter">
- <bean class="org.apache.geronimo.gshell.wisdom.shell.ConsolePrompterImpl">
- <constructor-arg ref="application"/>
- </bean>
- </property>
- <property name="errorHandler">
- <bean class="org.apache.geronimo.gshell.wisdom.shell.ConsoleErrorHandlerImpl" />
- </property>
- <property name="history">
- <bean class="org.apache.geronimo.gshell.wisdom.shell.HistoryImpl">
- <constructor-arg ref="application"/>
- </bean>
- </property>
- </bean>
-
- <bean id="commandNameCompleter" class="org.apache.geronimo.gshell.wisdom.completer.CommandNameCompleter"
- lazy-init="true">
- <constructor-arg ref="eventManager"/>
- <constructor-arg ref="commandRegistry"/>
- </bean>
-
- <bean id="aliasNameCompleter" class="org.apache.geronimo.gshell.wisdom.completer.AliasNameCompleter"
- lazy-init="true">
- <constructor-arg ref="eventManager"/>
- <constructor-arg ref="aliasRegistry"/>
- </bean>
-
- <bean id="commandsCompleter" class="org.apache.geronimo.gshell.wisdom.completer.CommandsCompleter" lazy-init="true">
- <constructor-arg ref="eventManager"/>
- <constructor-arg ref="commandRegistry"/>
- </bean>
-
- <bean id="variableNameCompleter" class="org.apache.geronimo.gshell.wisdom.completer.VariableNameCompleter" lazy-init="true">
- </bean>
-
-</beans>
diff --git a/karaf/gshell/gshell-run/src/main/resources/OSGI-INF/blueprint/gshell-commands.xml b/karaf/gshell/gshell-run/src/main/resources/OSGI-INF/blueprint/gshell-commands.xml
new file mode 100644
index 0000000..1acd1f9
--- /dev/null
+++ b/karaf/gshell/gshell-run/src/main/resources/OSGI-INF/blueprint/gshell-commands.xml
@@ -0,0 +1,271 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+
+ <command-bundle xmlns="http://felix.apache.org/karaf/xmlns/gshell/v1.0.0">
+ <command name="about">
+ <action class="org.apache.geronimo.gshell.commands.builtin.AboutAction">
+ <argument ref="application"/>
+ </action>
+ </command>
+
+ <command name="help">
+ <action class="org.apache.geronimo.gshell.commands.builtin.HelpAction">
+ <argument ref="commandResolver"/>
+ </action>
+ <completers>
+ <bean class="org.apache.geronimo.gshell.console.completer.AggregateCompleter">
+ <argument xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+ <list>
+ <ref component-id="aliasNameCompleter"/>
+ <ref component-id="commandNameCompleter"/>
+ </list>
+ </argument>
+ </bean>
+ <null/>
+ </completers>
+ </command>
+
+ <command name="exit">
+ <action class="org.apache.geronimo.gshell.commands.builtin.ExitAction"/>
+ </command>
+
+ <link name="quit" target="exit"/>
+
+ <command name="echo">
+ <action class="org.apache.geronimo.gshell.commands.builtin.EchoAction"/>
+ </command>
+
+ <command name="clear">
+ <action class="org.apache.geronimo.gshell.commands.builtin.ClearAction"/>
+ </command>
+
+ <command name="source">
+ <action class="org.apache.geronimo.gshell.commands.builtin.SourceAction">
+ <argument ref="commandLineExecutor"/>
+ <argument ref="fileSystemAccess"/>
+ </action>
+ <completers>
+ <ref component-id="fileObjectNameCompleter"/>
+ <null/>
+ </completers>
+ </command>
+
+ <command name="set">
+ <action class="org.apache.geronimo.gshell.commands.builtin.SetAction"/>
+ </command>
+
+ <command name="unset">
+ <action class="org.apache.geronimo.gshell.commands.builtin.UnsetAction"/>
+ <completers>
+ <ref component-id="variableNameCompleter"/>
+ <null/>
+ </completers>
+ </command>
+
+ <command name="alias">
+ <action class="org.apache.geronimo.gshell.commands.builtin.AliasAction">
+ <argument ref="aliasRegistry"/>
+ </action>
+ </command>
+
+ <command name="unalias">
+ <action class="org.apache.geronimo.gshell.commands.builtin.UnaliasAction">
+ <argument ref="aliasRegistry"/>
+ </action>
+ <completers>
+ <ref component-id="aliasNameCompleter"/>
+ <null/>
+ </completers>
+ </command>
+
+ <command name="history">
+ <action class="org.apache.geronimo.gshell.commands.builtin.HistoryAction"/>
+ </command>
+
+ <command name="info">
+ <action class="org.apache.felix.karaf.gshell.core.commands.InfoAction">
+ <argument ref="branding" />
+ </action>
+ </command>
+ </command-bundle>
+
+ <command-bundle xmlns="http://felix.apache.org/karaf/xmlns/gshell/v1.0.0">
+ <command name="ssh">
+ <action class="org.apache.geronimo.gshell.commands.ssh.SshAction"/>
+ </command>
+
+ <command name="sshd">
+ <action class="org.apache.geronimo.gshell.commands.ssh.SshServerAction"/>
+ </command>
+ </command-bundle>
+
+ <command-bundle xmlns="http://felix.apache.org/karaf/xmlns/gshell/v1.0.0">
+ <command name="exec">
+ <action class="org.apache.geronimo.gshell.commands.shell.ExecuteAction"/>
+ </command>
+
+ <command name="java">
+ <action class="org.apache.geronimo.gshell.commands.shell.JavaAction"/>
+ </command>
+
+ <command name="sleep">
+ <action class="org.apache.geronimo.gshell.commands.shell.SleepAction"/>
+ </command>
+
+ <command name="date">
+ <action class="org.apache.geronimo.gshell.commands.shell.DateAction"/>
+ </command>
+
+ <command name="edit">
+ <action class="org.apache.geronimo.gshell.commands.shell.EditAction">
+ <property name="fileSystemAccess" ref="fileSystemAccess"/>
+ </action>
+ <completers>
+ <ref component-id="fileObjectNameCompleter"/>
+ <null/>
+ </completers>
+ </command>
+
+ <command name="find">
+ <action class="org.apache.geronimo.gshell.commands.shell.FindAction">
+ <property name="fileSystemAccess" ref="fileSystemAccess"/>
+ </action>
+ <completers>
+ <ref component-id="fileObjectNameCompleter"/>
+ <null/>
+ </completers>
+ </command>
+
+ <command name="sort">
+ <action class="org.apache.geronimo.gshell.commands.text.SortAction">
+ <property name="fileSystemAccess" ref="fileSystemAccess"/>
+ </action>
+ <completers>
+ <ref component-id="fileObjectNameCompleter"/>
+ <null/>
+ </completers>
+ </command>
+ </command-bundle>
+
+ <command-bundle xmlns="http://felix.apache.org/karaf/xmlns/gshell/v1.0.0">
+ <command name="hostname">
+ <action class="org.apache.geronimo.gshell.commands.network.HostnameAction"/>
+ </command>
+ </command-bundle>
+
+ <command-bundle xmlns="http://felix.apache.org/karaf/xmlns/gshell/v1.0.0">
+ <link name="print" target="echo"/>
+
+ <command name="printf">
+ <action class="org.apache.geronimo.gshell.commands.text.PrintfAction"/>
+ </command>
+
+ <command name="cat">
+ <action class="org.apache.geronimo.gshell.commands.text.CatAction">
+ <property name="fileSystemAccess" ref="fileSystemAccess"/>
+ </action>
+ <completers>
+ <ref component-id="fileObjectNameCompleter"/>
+ <null/>
+ </completers>
+ </command>
+
+ <command name="grep">
+ <action class="org.apache.geronimo.gshell.commands.text.GrepAction"/>
+ </command>
+ </command-bundle>
+
+ <command-bundle xmlns="http://felix.apache.org/karaf/xmlns/gshell/v1.0.0">
+ <command name="cd">
+ <action class="org.apache.geronimo.gshell.commands.file.ChangeDirectoryAction">
+ <property name="fileSystemAccess" ref="fileSystemAccess"/>
+ </action>
+ <completers>
+ <ref component-id="fileObjectNameCompleter"/>
+ <null/>
+ </completers>
+ </command>
+
+ <command name="pwd">
+ <action class="org.apache.geronimo.gshell.commands.file.CurrentDirectoryAction">
+ <property name="fileSystemAccess" ref="fileSystemAccess"/>
+ </action>
+ </command>
+
+ <command name="ls">
+ <action class="org.apache.geronimo.gshell.commands.file.ListDirectoryAction">
+ <property name="fileSystemAccess" ref="fileSystemAccess"/>
+ </action>
+ <completers>
+ <ref component-id="fileObjectNameCompleter"/>
+ <null/>
+ </completers>
+ </command>
+
+ <link name="dir" target="ls"/>
+
+ <command name="cp">
+ <action class="org.apache.geronimo.gshell.commands.file.CopyAction">
+ <property name="fileSystemAccess" ref="fileSystemAccess"/>
+ </action>
+ <completers>
+ <ref component-id="fileObjectNameCompleter"/>
+ <ref component-id="fileObjectNameCompleter"/>
+ <null/>
+ </completers>
+ </command>
+
+ <link name="copy" target="cp"/>
+
+ <command name="rm">
+ <action class="org.apache.geronimo.gshell.commands.file.RemoveAction">
+ <property name="fileSystemAccess" ref="fileSystemAccess"/>
+ </action>
+ <completers>
+ <ref component-id="fileObjectNameCompleter"/>
+ <null/>
+ </completers>
+ </command>
+
+ <link name="del" target="rm"/>
+
+ <command name="fileinfo">
+ <action class="org.apache.geronimo.gshell.commands.file.FileInfoAction">
+ <property name="fileSystemAccess" ref="fileSystemAccess"/>
+ </action>
+ <completers>
+ <ref component-id="fileObjectNameCompleter"/>
+ <null/>
+ </completers>
+ </command>
+
+ <command name="touch">
+ <action class="org.apache.geronimo.gshell.commands.file.TouchAction">
+ <property name="fileSystemAccess" ref="fileSystemAccess"/>
+ </action>
+ <completers>
+ <ref component-id="fileObjectNameCompleter"/>
+ <null/>
+ </completers>
+ </command>
+ </command-bundle>
+
+</blueprint>
diff --git a/karaf/gshell/gshell-run/src/main/resources/OSGI-INF/blueprint/gshell-local.xml b/karaf/gshell/gshell-run/src/main/resources/OSGI-INF/blueprint/gshell-local.xml
new file mode 100644
index 0000000..db5d9f0
--- /dev/null
+++ b/karaf/gshell/gshell-run/src/main/resources/OSGI-INF/blueprint/gshell-local.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+
+ <bean id="localShell" class="org.apache.felix.karaf.gshell.core.ShellWrapper">
+ <argument ref="shell" />
+ </bean>
+
+ <bean id="localConsole" class="org.apache.felix.karaf.gshell.core.LocalConsole" init-method="init" destroy-method="destroy">
+ <property name="createLocalShell" value="$[karaf.startLocalConsole]"/>
+ <property name="shell" ref="localShell"/>
+ <property name="bundleContext" ref="blueprintBundleContext"/>
+ </bean>
+
+</blueprint>
\ No newline at end of file
diff --git a/karaf/gshell/gshell-run/src/main/resources/OSGI-INF/blueprint/gshell-osgi.xml b/karaf/gshell/gshell-run/src/main/resources/OSGI-INF/blueprint/gshell-osgi.xml
new file mode 100644
index 0000000..8d0676c
--- /dev/null
+++ b/karaf/gshell/gshell-run/src/main/resources/OSGI-INF/blueprint/gshell-osgi.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:cm="http://www.osgi.org/xmlns/blueprint-cm/v1.0.0"
+ default-availability="optional">
+
+ <cm:property-placeholder persistent-id="org.apache.felix.karaf.shell">
+ <cm:default-properties>
+ <cm:property name="sshPort" value="8101"/>
+ <cm:property name="sshRealm" value="karaf"/>
+ <cm:property name="hostKey" value="${karaf.base}/etc/host.key"/>
+ </cm:default-properties>
+ </cm:property-placeholder>
+
+ <bean id="osgiCommandRegistry" class="org.apache.felix.karaf.gshell.core.OsgiCommandRegistry">
+ <argument ref="commandRegistry"/>
+ </bean>
+
+ <bean id="osgiAliasRegistry" class="org.apache.felix.karaf.gshell.core.OsgiAliasRegistry">
+ <argument ref="aliasRegistry"/>
+ </bean>
+
+ <ref-list id="osgiCommands" interface="org.apache.geronimo.gshell.command.Command">
+ <listener ref="osgiCommandRegistry" bind-method="register" unbind-method="unregister"/>
+ </ref-list>
+
+ <ref-list id="osgiLinkCommands" interface="org.apache.geronimo.gshell.command.Link">
+ <listener ref="osgiCommandRegistry" bind-method="register" unbind-method="unregister"/>
+ </ref-list>
+
+ <ref-list id="osgiAliases" interface="org.apache.geronimo.gshell.command.Alias">
+ <listener ref="osgiAliasRegistry" bind-method="register" unbind-method="unregister"/>
+ </ref-list>
+
+ <service ref="localShell" interface="org.apache.geronimo.gshell.shell.Shell"/>
+
+ <service ref="commandLineExecutor" interface="org.apache.geronimo.gshell.commandline.CommandLineExecutor"/>
+
+</blueprint>
diff --git a/karaf/gshell/gshell-run/src/main/resources/OSGI-INF/blueprint/gshell-remote.xml b/karaf/gshell/gshell-run/src/main/resources/OSGI-INF/blueprint/gshell-remote.xml
new file mode 100644
index 0000000..87c3100
--- /dev/null
+++ b/karaf/gshell/gshell-run/src/main/resources/OSGI-INF/blueprint/gshell-remote.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:ext="http://geronimo.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0">
+
+ <ext:property-placeholder placeholder-prefix="$[" placeholder-suffix="]"/>
+
+ <bean id="sshClient" class="org.apache.sshd.SshClient" factory-method="setUpDefaultClient" init-method="start" destroy-method="stop">
+ </bean>
+
+ <bean id="sshServer" class="org.apache.sshd.SshServer" factory-method="setUpDefaultServer" scope="prototype">
+ <property name="port" value="${sshPort}" />
+ <property name="shellFactory">
+ <bean class="org.apache.geronimo.gshell.commands.ssh.ShellFactoryImpl">
+ <property name="application" ref="application" />
+ <property name="completers">
+ <list>
+ <ref component-id="commandsCompleter"/>
+ <ref component-id="aliasNameCompleter"/>
+ </list>
+ </property>
+ <property name="executor" ref="commandLineExecutor" />
+ <property name="prompter">
+ <bean class="org.apache.geronimo.gshell.wisdom.shell.ConsolePrompterImpl">
+ <argument ref="application"/>
+ </bean>
+ </property>
+ <property name="errorHandler">
+ <bean class="org.apache.geronimo.gshell.wisdom.shell.ConsoleErrorHandlerImpl" />
+ </property>
+ <property name="history">
+ <bean class="org.apache.geronimo.gshell.wisdom.shell.HistoryImpl">
+ <argument ref="application"/>
+ </bean>
+ </property>
+ </bean>
+ </property>
+ <property name="commandFactory">
+ <bean class="org.apache.felix.karaf.gshell.core.sshd.ShellCommandFactory">
+ <property name="executor" ref="commandLineExecutor" />
+ </bean>
+ </property>
+ <property name="keyPairProvider" ref="keyPairProvider" />
+ <property name="passwordAuthenticator" ref="passwordAuthenticator" />
+ </bean>
+
+ <bean id="keyPairProvider" class="org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider">
+ <property name="path" value="${hostKey}" />
+ </bean>
+ <bean id="passwordAuthenticator" class="org.apache.sshd.server.jaas.JaasPasswordAuthenticator">
+ <property name="domain" value="${sshRealm}" />
+ </bean>
+
+ <bean id="sshServerFactory" class="org.apache.felix.karaf.gshell.core.sshd.SshServerFactory" init-method="start" destroy-method="stop">
+ <argument ref="sshServer" />
+ <property name="start" value="$[karaf.startRemoteShell]" />
+ </bean>
+
+</blueprint>
\ No newline at end of file
diff --git a/karaf/gshell/gshell-run/src/main/resources/META-INF/spring/gshell-vfs.xml b/karaf/gshell/gshell-run/src/main/resources/OSGI-INF/blueprint/gshell-vfs.xml
similarity index 69%
rename from karaf/gshell/gshell-run/src/main/resources/META-INF/spring/gshell-vfs.xml
rename to karaf/gshell/gshell-run/src/main/resources/OSGI-INF/blueprint/gshell-vfs.xml
index 018b7d0..354eab0 100644
--- a/karaf/gshell/gshell-run/src/main/resources/META-INF/spring/gshell-vfs.xml
+++ b/karaf/gshell/gshell-run/src/main/resources/OSGI-INF/blueprint/gshell-vfs.xml
@@ -17,45 +17,26 @@
limitations under the License.
-->
-<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"
- 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://servicemix.apache.org/schema/servicemix-gshell
- http://servicemix.apache.org/schema/servicemix-gshell/servicemix-gshell.xsd"
- default-autowire="no"
- default-dependency-check="none"
- default-init-method="init"
- default-destroy-method="destroy">
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+
+ <type-converters>
+ <bean class="org.apache.geronimo.gshell.vfs.config.CacheStrategyConverter"/>
+ </type-converters>
<bean id="fileSystemAccess" class="org.apache.geronimo.gshell.vfs.FileSystemAccessImpl">
- <constructor-arg ref="fileSystemManager"/>
+ <argument ref="fileSystemManager"/>
</bean>
<bean id="fileObjectNameCompleter" class="org.apache.geronimo.gshell.vfs.FileObjectNameCompleter">
- <constructor-arg ref="fileSystemAccess"/>
- </bean>
-
- <bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">
- <property name="customEditors">
- <map>
- <entry key="org.apache.commons.vfs.CacheStrategy">
- <bean class="org.apache.geronimo.gshell.vfs.config.CacheStrategyEditor"/>
- </entry>
- </map>
- </property>
+ <argument ref="fileSystemAccess"/>
</bean>
<!--
TODO: Set tempDir File arg in constructor to set the temporary location, may need 2 replicators?
-->
- <bean id="defaultFileReplicator" class="org.apache.commons.vfs.impl.DefaultFileReplicator"/>
+ <bean id="defaultFileReplicator" class="org.apache.commons.vfs.impl.DefaultFileReplicator" init-method="init"/>
- <bean id="fileSystemManagerFactory" class="org.apache.geronimo.gshell.vfs.config.FileSystemManagerFactory">
+ <bean id="fileSystemManagerFactory" class="org.apache.geronimo.gshell.vfs.config.FileSystemManagerFactory" init-method="init">
<property name="filesCache">
<bean class="org.apache.commons.vfs.cache.SoftRefFilesCache"/>
</property>
@@ -64,7 +45,7 @@
<property name="fileReplicator">
<bean class="org.apache.commons.vfs.impl.PrivilegedFileReplicator">
- <constructor-arg ref="defaultFileReplicator"/>
+ <argument ref="defaultFileReplicator"/>
</bean>
</property>
@@ -72,7 +53,7 @@
TODO: Try and root the temporary store under ${gshell.home}/tmp or something
-->
<property name="temporaryFileStore">
- <ref bean="defaultFileReplicator"/>
+ <ref component-id="defaultFileReplicator"/>
</property>
<property name="fileContentInfoFactory">
@@ -83,9 +64,10 @@
<bean class="org.apache.commons.vfs.provider.url.UrlFileProvider"/>
</property>
</bean>
- <bean id="fileSystemManager" factory-bean="fileSystemManagerFactory" factory-method="getFileSystemManager"/>
- <bean class="org.apache.geronimo.gshell.vfs.config.FileProviderConfigurer">
+ <bean id="fileSystemManager" factory-ref="fileSystemManagerFactory" factory-method="getFileSystemManager"/>
+
+ <bean class="org.apache.geronimo.gshell.vfs.config.FileProviderConfigurer" init-method="init">
<property name="fileSystemManager" ref="fileSystemManager"/>
<property name="scheme" value="tmp"/>
<property name="provider">
@@ -93,7 +75,7 @@
</property>
</bean>
- <bean class="org.apache.geronimo.gshell.vfs.config.FileProviderConfigurer">
+ <bean class="org.apache.geronimo.gshell.vfs.config.FileProviderConfigurer" init-method="init">
<property name="fileSystemManager" ref="fileSystemManager"/>
<property name="scheme" value="ram"/>
<property name="provider">
@@ -101,7 +83,7 @@
</property>
</bean>
- <bean class="org.apache.geronimo.gshell.vfs.config.FileProviderConfigurer">
+ <bean class="org.apache.geronimo.gshell.vfs.config.FileProviderConfigurer" init-method="init">
<property name="fileSystemManager" ref="fileSystemManager"/>
<property name="scheme" value="file"/>
<property name="provider">
@@ -109,7 +91,7 @@
</property>
</bean>
- <bean class="org.apache.geronimo.gshell.vfs.config.FileProviderConfigurer">
+ <bean class="org.apache.geronimo.gshell.vfs.config.FileProviderConfigurer" init-method="init">
<property name="fileSystemManager" ref="fileSystemManager"/>
<property name="scheme" value="mvn"/>
<property name="provider">
@@ -117,18 +99,18 @@
</property>
</bean>
- <bean id="metaDataRegistry" class="org.apache.geronimo.gshell.vfs.provider.meta.data.MetaDataRegistryImpl">
- <constructor-arg ref="eventManager" />
+ <bean id="metaDataRegistry" class="org.apache.geronimo.gshell.vfs.provider.meta.data.MetaDataRegistryImpl" init-method="init">
+ <argument ref="eventManager" />
</bean>
- <bean id="metaFileProviderConfigurer" class="org.apache.geronimo.gshell.vfs.config.FileProviderConfigurer">
+ <bean id="metaFileProviderConfigurer" class="org.apache.geronimo.gshell.vfs.config.FileProviderConfigurer" init-method="init">
<property name="fileSystemManager" ref="fileSystemManager"/>
<property name="scheme" value="meta"/>
<property name="provider">
<bean class="org.apache.geronimo.gshell.vfs.provider.meta.MetaFileProvider">
- <constructor-arg ref="metaDataRegistry"/>
+ <argument ref="metaDataRegistry"/>
</bean>
</property>
</bean>
-</beans>
+</blueprint>
\ No newline at end of file
diff --git a/karaf/gshell/gshell-run/src/main/resources/OSGI-INF/blueprint/gshell.xml b/karaf/gshell/gshell-run/src/main/resources/OSGI-INF/blueprint/gshell.xml
new file mode 100644
index 0000000..8c14f60
--- /dev/null
+++ b/karaf/gshell/gshell-run/src/main/resources/OSGI-INF/blueprint/gshell.xml
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+
+ <bean id="io" class="org.apache.geronimo.gshell.io.IO">
+ <property name="verbosity" value="DEBUG"/>
+ </bean>
+
+ <bean id="branding" class="org.apache.felix.karaf.gshell.core.DefaultBranding">
+ <property name="prompt" value="@|bold %{gshell.username}|@%{application.id}:@|bold %{gshell.group}|> " />
+ </bean>
+
+ <bean id="application" class="org.apache.felix.karaf.gshell.core.ApplicationImpl" init-method="init">
+ <property name="id" value="$[karaf.name]"/>
+ <property name="io" ref="io"/>
+ <property name="model">
+ <bean class="org.apache.geronimo.gshell.application.model.ApplicationModel">
+ <property name="branding" ref="branding"/>
+ </bean>
+ </property>
+ <property name="variables">
+ <bean class="org.apache.geronimo.gshell.command.Variables"/>
+ </property>
+ </bean>
+
+ <bean id="beanContainer" class="org.apache.felix.karaf.gshell.core.BeanContainerWrapper">
+ <argument ref="blueprintContainer"/>
+ </bean>
+
+ <bean id="eventManager" class="org.apache.geronimo.gshell.event.EventManagerImpl"/>
+
+ <bean id="applicationManager" class="org.apache.felix.karaf.gshell.core.ApplicationManagerImpl" init-method="init" destroy-method="destroy">
+ <argument ref="eventManager" />
+ <argument ref="application" />
+ <argument ref="blueprintContainer"/>
+ </bean>
+
+ <bean id="commandLineParser" class="org.apache.geronimo.gshell.parser.CommandLineParser"/>
+
+ <bean id="aliasRegistry" class="org.apache.geronimo.gshell.wisdom.registry.AliasRegistryImpl">
+ <argument ref="eventManager"/>
+ </bean>
+
+ <bean id="aliasMetaMapper" class="org.apache.geronimo.gshell.wisdom.registry.AliasMetaMapper" init-method="init">
+ <argument ref="eventManager"/>
+ <argument ref="metaDataRegistry"/>
+ <argument ref="aliasRegistry"/>
+ </bean>
+
+ <bean id="commandRegistry" class="org.apache.geronimo.gshell.wisdom.registry.CommandRegistryImpl">
+ <argument ref="eventManager"/>
+ </bean>
+
+ <bean id="commandMetaMapper" class="org.apache.geronimo.gshell.wisdom.registry.CommandMetaMapper" init-method="init">
+ <argument ref="eventManager"/>
+ <argument ref="metaDataRegistry"/>
+ <argument ref="commandRegistry"/>
+ </bean>
+
+ <bean id="groupDirResolver" class="org.apache.geronimo.gshell.wisdom.registry.GroupDirectoryResolver">
+ <argument ref="fileSystemAccess"/>
+ </bean>
+
+ <bean id="commandResolver" class="org.apache.felix.karaf.gshell.core.CommandResolverImpl">
+ <argument ref="fileSystemAccess"/>
+ <argument ref="groupDirResolver"/>
+ <property name="beanContainer" ref="beanContainer"/>
+ <property name="aliasCommandBeanId">
+ <idref component-id="aliasCommandPrototype"/>
+ </property>
+ <property name="groupCommandBeanId">
+ <idref component-id="groupCommandPrototype"/>
+ </property>
+ </bean>
+
+ <bean id="aliasCommandPrototype" class="org.apache.felix.karaf.gshell.core.WorkAroundAliasCommand" scope="prototype">
+ <argument ref="commandLineExecutor"/>
+ <property name="beanContainer" ref="beanContainer"/>
+ </bean>
+
+ <bean id="groupCommandPrototype" class="org.apache.geronimo.gshell.wisdom.command.GroupCommand" scope="prototype">
+ <property name="beanContainer" ref="beanContainer"/>
+ </bean>
+
+ <bean id="commandLineBuilder" class="org.apache.geronimo.gshell.wisdom.shell.CommandLineBuilderImpl">
+ <argument ref="commandLineParser"/>
+ </bean>
+
+ <bean id="commandLineExecutor" class="org.apache.geronimo.gshell.wisdom.shell.CommandLineExecutorImpl">
+ <argument ref="commandResolver"/>
+ <argument ref="commandLineBuilder"/>
+ </bean>
+
+ <bean id="shell" class="org.apache.geronimo.gshell.wisdom.shell.ShellImpl" scope="prototype" init-method="init" destroy-method="close">
+ <argument ref="application"/>
+ <argument ref="commandLineExecutor"/>
+
+ <property name="completers">
+ <list>
+ <ref component-id="commandsCompleter"/>
+ <ref component-id="aliasNameCompleter"/>
+ </list>
+ </property>
+ <property name="prompter">
+ <bean class="org.apache.geronimo.gshell.wisdom.shell.ConsolePrompterImpl">
+ <argument ref="application"/>
+ </bean>
+ </property>
+ <property name="errorHandler">
+ <bean class="org.apache.geronimo.gshell.wisdom.shell.ConsoleErrorHandlerImpl" />
+ </property>
+ <property name="history">
+ <bean class="org.apache.geronimo.gshell.wisdom.shell.HistoryImpl">
+ <argument ref="application"/>
+ </bean>
+ </property>
+ </bean>
+
+ <bean id="commandNameCompleter" class="org.apache.geronimo.gshell.wisdom.completer.CommandNameCompleter"
+ initialization="lazy" init-method="init">
+ <argument ref="eventManager"/>
+ <argument ref="commandRegistry"/>
+ </bean>
+
+ <bean id="aliasNameCompleter" class="org.apache.geronimo.gshell.wisdom.completer.AliasNameCompleter"
+ initialization="lazy" init-method="init">
+ <argument ref="eventManager"/>
+ <argument ref="aliasRegistry"/>
+ </bean>
+
+ <bean id="commandsCompleter" class="org.apache.geronimo.gshell.wisdom.completer.CommandsCompleter" initialization="lazy" init-method="init">
+ <argument ref="eventManager"/>
+ <argument ref="commandRegistry"/>
+ </bean>
+
+ <bean id="variableNameCompleter" class="org.apache.geronimo.gshell.wisdom.completer.VariableNameCompleter" initialization="lazy">
+ </bean>
+
+</blueprint>
\ No newline at end of file