FELIX-1098: Remove some spring strong dependencies
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@771210 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/ApplicationImpl.java b/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/ApplicationImpl.java
index 31bbcc4..a512d44 100644
--- a/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/ApplicationImpl.java
+++ b/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/ApplicationImpl.java
@@ -30,7 +30,7 @@
import org.apache.geronimo.gshell.io.IO;
import org.springframework.beans.factory.InitializingBean;
-public class ApplicationImpl implements Application, InitializingBean {
+public class ApplicationImpl implements Application {
private static final String EMBEDDED_PROPS = "org/apache/felix/karaf/version/embedded.properties";
private static final String SERVICEMIX_VERSION ="org/apache/felix/karaf/gshell/core/servicemix-version.properties";
@@ -49,7 +49,7 @@
this.homeDir = detectHomeDir();
}
- public void afterPropertiesSet() throws Exception {
+ public void init() throws Exception {
Properties props = new Properties();
props.load(getClass().getClassLoader().getResourceAsStream(SERVICEMIX_VERSION));
String kernelVersion = props.getProperty(VERSION_PROPERTY);
diff --git a/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/LocalConsole.java b/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/LocalConsole.java
index 7c33294..5c5c0d8 100644
--- a/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/LocalConsole.java
+++ b/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/LocalConsole.java
@@ -32,9 +32,8 @@
import org.osgi.util.tracker.ServiceTracker;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.osgi.context.BundleContextAware;
-public class LocalConsole implements Runnable, BundleContextAware {
+public class LocalConsole implements Runnable {
private final Logger log = LoggerFactory.getLogger(getClass());
diff --git a/karaf/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-local.xml b/karaf/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-local.xml
index b6bcfcf..ed09d8f 100644
--- a/karaf/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-local.xml
+++ b/karaf/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-local.xml
@@ -40,6 +40,7 @@
</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>
diff --git a/karaf/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-osgi.xml b/karaf/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-osgi.xml
index 8072080..588f5af 100644
--- a/karaf/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-osgi.xml
+++ b/karaf/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-osgi.xml
@@ -65,7 +65,7 @@
<osgi:service ref="commandLineExecutor" interface="org.apache.geronimo.gshell.commandline.CommandLineExecutor">
</osgi:service>
- <osgix:cm-properties id="cmProps" persistent-id="org.apache.servicemix.shell">
+ <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>
diff --git a/karaf/gshell/gshell-core/src/main/resources/META-INF/spring/gshell.xml b/karaf/gshell/gshell-core/src/main/resources/META-INF/spring/gshell.xml
index ed26b9b..f2dbcf7 100644
--- a/karaf/gshell/gshell-core/src/main/resources/META-INF/spring/gshell.xml
+++ b/karaf/gshell/gshell-core/src/main/resources/META-INF/spring/gshell.xml
@@ -41,7 +41,7 @@
<property name="prompt" value="@|bold %{gshell.username}|@%{application.id}:@|bold %{gshell.group}|> " />
</bean>
- <bean id="application" class="org.apache.felix.karaf.gshell.core.ApplicationImpl">
+ <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">