Hi JP,
does your command bean implements
org.apache.karaf.shell.api.action.Action or is it a gogo command ?
Regards
JB
On 11/16/2015 06:05 PM, CLEMENT Jean-Philippe wrote:
Dear Karaf addicts,
I export custom Karaf shell commands using blueprint. It was ok with
Karaf 3.0.x, but not working (i.e. no custom command available in the
shell) with 4.0.3.
For instance:
Java:
public /*final*/ MySimulator { // No final as GOGO command
public void sayHello() {
System.out.println("hello");
}
}
XML:
<bean id="mySimulator" class="shell.MySimulator"/>
<service ref="mySimulator" auto-export="class-hierarchy">
<service-properties>
<entry key="osgi.command.scope" value="simu"/>
<entry key="osgi.command.function">
<array>
<value>sayHello</value>
</array>
</entry>
</service-properties>
</service>
How to fix this and allow Karaf to handle my commands?
PS: the assembly does include the following boot features:
aries-blueprint, bundle, shell-compat, ssh
Kind regards,
Jean-Philippe
[@@ OPEN @@]
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com