karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: Writing commands for karaf shell.
Date Fri, 21 Jul 2017 10:01:41 GMT
From a karaf perspective, the standard is to use karaf commands/annotations. Gogo commands
support is just for compatibility (as the features are limited). When gogo commands will improve
and provide the same the same features, it could change.

Others may have different standpoint but there's mine ;)

Regards
JB

On Jul 21, 2017, 11:54, at 11:54, tom@quarendon.net wrote:
>There was a thread recently related to this, but I have a different
>question.
>
>I'm confused about the shell situation, and what is "standard" and what
>is not.
>
>I have naively written some commands for the felix gogo shell. We
>develop using bndtools (obviously) and use the OSGI enRoute templates,
>and that's all set up to use the apache felix gogo shell implementation
>and related bundles. 
>The commands I have written make use of what I *thought* were standard
>features such as org.apache.felix.service.command.Descriptor and
>org.apache.felix.service.command.Parameter parameter annotations and
>the org.apache.felix.service.command.CommandSession interface (though
>the fact that they are in the felix namespace did confuse me). The
>commands are registered using the osgi.enroute.debug.api.Debug
>constants.
>
>If I try and run these inside Karaf it clearly understands that the
>command is there, so the registration is working, it's just it
>obviously doesn't understand the Parameter annotations and
>CommandSession interface, so can't call it ("cannot cooerce ..."
>error).
>
>From the examples, Karaf has its own, non standard way of writing
>command extensions, it doesn't seem to use the
>osgi.enroute.debug.api.Debug constants.
>
>So can someone clarify the situation?
>Is *anything* actually standard at all? I can't find any reference in
>the OSGi specs to a shell (but then I'm probably not looking for the
>right thing), so perhaps not. 
>Does karaf use the apache felix gogo shell implementation (I thought it
>did)?
>If so, should it be able to understand things like the Parameter
>annotation, and CommandSession?
>
>Or should this all work, but it's just that I'm missing some vital
>bundle in my installation?
>
>Thanks.

Mime
View raw message