[jira] [Commented] (FELIX-5970) Add requirement & capabilities model so gogo can be resolved
[ https://issues.apache.org/jira/browse/FELIX-5970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16709723#comment-16709723 ] Markus Rathgeb commented on FELIX-5970: --- Do you also consider to add an `osgi.implementation` capability, so bundles that require an command interpreter could depend on? See e.g. https://github.com/osgi/osgi.enroute/pull/92#discussion_r238225903 > Add requirement & capabilities model so gogo can be resolved > > > Key: FELIX-5970 > URL: https://issues.apache.org/jira/browse/FELIX-5970 > Project: Felix > Issue Type: Improvement > Components: Gogo Command, Gogo JLine, Gogo Runtime, Gogo Shell >Reporter: Raymond Augé >Assignee: Raymond Augé >Priority: Major > Fix For: gogo.command-1.1.0, gogo.runtime-1.1.2, > gogo.shell-1.1.2, gogo.jline-1.1.2 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FELIX-5970) Add requirement & capabilities model so gogo can be resolved
[ https://issues.apache.org/jira/browse/FELIX-5970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16725182#comment-16725182 ] Raymond Augé commented on FELIX-5970: - I've implemented it slightly differently. There's a gogo specific namespace called {{org.apache.felix.gogo}} and it is used to resolve the Gogo _love triangle_ (runtime, shell impl, command.) A third party uses the requirement like so: {code:java} // for `org.apache.felix.gogo.shell` Require-Capability: org.apache.felix.gogo;filter:="(&(org.apache.felix.gogo=shell.implementation)(implementation.name=gogo.shell))" // for `org.apache.felix.gogo.jline` Require-Capability: org.apache.felix.gogo;filter:="(&(org.apache.felix.gogo=shell.implementation)(implementation.name=gogo.jline))"{code} However, the simpler way to use it is with the {{@Retention(CLASS)}} annotation {code:java} @org.apache.felix.service.command.annotation.RequireGogo{code} With this annotation you can choose which shell impl you want: {code:java} // for `org.apache.felix.gogo.shell` @RequireGogo OR @RequireGogo(RequireGogo.SHELL) // for `org.apache.felix.gogo.jline` @RequireGogo(RequireGogo.JLINE){code} The annotation is {code:java} @Target({TYPE, PACKAGE}{code} > Add requirement & capabilities model so gogo can be resolved > > > Key: FELIX-5970 > URL: https://issues.apache.org/jira/browse/FELIX-5970 > Project: Felix > Issue Type: Improvement > Components: Gogo Command, Gogo JLine, Gogo Runtime, Gogo Shell >Reporter: Raymond Augé >Assignee: Raymond Augé >Priority: Major > Fix For: gogo.command-1.1.0, gogo.runtime-1.1.2, > gogo.shell-1.1.2, gogo.jline-1.1.2 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FELIX-5970) Add requirement & capabilities model so gogo can be resolved
[ https://issues.apache.org/jira/browse/FELIX-5970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16726854#comment-16726854 ] Timothy Ward commented on FELIX-5970: - {quote}I've implemented it slightly differently. There's a gogo specific namespace called {{org.apache.felix.gogo}} and it is used to resolve the Gogo _love triangle_ (runtime, shell impl, command.) {quote} I'm not sure why this approach was taken. Gogo commands use a whiteboard model and so as someone contributing a Gogo command I would expect to use the osgi.implementation namespace to pull in a whiteboard implementation. I can understand that if you want to start doing *deep shell* work with live input or changing the colour of the text then you need something more akin to the model that you have defined, but what if I just want to provide a command that could be used with vanilla Gogo or JLine Gogo? For something nicely usable I would expect to see the following annotations: {{@Requirement(namespace="osgi.implementation" name="felix.gogo.command", version=1.0.0)}} {{public @interface RequireCommandWhiteboard \{ }}} {{@RequireCommandWhiteboard}} {{@ComponentPropertyType}} {{public @interface GogoCommand {}}{{ }} {{ public static final String _PREFIX = "osgi.command.";}}{{ }} {{ public String scope();}}{{ }} {{ public String[] function();}} {{}}} These would then be used as follows: {{@GogoCommand(scope="foo" function=\{"bar", "baz"})}} {{@Component(service=MyCommand.class)}} {{public class MyCommand {}} {{ public String bar() \{ ... }}} {{ public String baz(int n) \{ ... }}} {{}}} > Add requirement & capabilities model so gogo can be resolved > > > Key: FELIX-5970 > URL: https://issues.apache.org/jira/browse/FELIX-5970 > Project: Felix > Issue Type: Improvement > Components: Gogo Command, Gogo JLine, Gogo Runtime, Gogo Shell >Reporter: Raymond Augé >Assignee: Raymond Augé >Priority: Major > Fix For: gogo.command-1.1.0, gogo.runtime-1.1.2, > gogo.shell-1.1.2, gogo.jline-1.1.2 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FELIX-5970) Add requirement & capabilities model so gogo can be resolved
[ https://issues.apache.org/jira/browse/FELIX-5970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16726865#comment-16726865 ] Raymond Augé commented on FELIX-5970: - If you want me to add an annotation for that too, I will. > Add requirement & capabilities model so gogo can be resolved > > > Key: FELIX-5970 > URL: https://issues.apache.org/jira/browse/FELIX-5970 > Project: Felix > Issue Type: Improvement > Components: Gogo Command, Gogo JLine, Gogo Runtime, Gogo Shell >Reporter: Raymond Augé >Assignee: Raymond Augé >Priority: Major > Fix For: gogo.command-1.1.0, gogo.runtime-1.1.2, > gogo.shell-1.1.2, gogo.jline-1.1.2 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FELIX-5970) Add requirement & capabilities model so gogo can be resolved
[ https://issues.apache.org/jira/browse/FELIX-5970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16726870#comment-16726870 ] Timothy Ward commented on FELIX-5970: - {quote}If you want me to add an annotation for that too, I will. {quote} I see this as the primary usage pattern for people providing commands into Gogo, so I think that something like a @RequireCommandWhiteboard or @RequireCommandRuntime is pretty important. I'd be happy to add the ComponentPropertyType annotations too, that way we can make it really easy for people to build runtimes which provide custom Gogo commands using DS. > Add requirement & capabilities model so gogo can be resolved > > > Key: FELIX-5970 > URL: https://issues.apache.org/jira/browse/FELIX-5970 > Project: Felix > Issue Type: Improvement > Components: Gogo Command, Gogo JLine, Gogo Runtime, Gogo Shell >Reporter: Raymond Augé >Assignee: Raymond Augé >Priority: Major > Fix For: gogo.command-1.1.0, gogo.runtime-1.1.2, > gogo.shell-1.1.2, gogo.jline-1.1.2 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FELIX-5970) Add requirement & capabilities model so gogo can be resolved
[ https://issues.apache.org/jira/browse/FELIX-5970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16726864#comment-16726864 ] Raymond Augé commented on FELIX-5970: - Hey [~timothyjward] if you want to build commands then you have a requirement you can use: {code:java} @org.osgi.annotation.bundle.Requirement( effective = "active", namespace = "org.apache.felix.gogo", name = "runtime.implementation" ){code} So I'm not sure what the issue is. > Add requirement & capabilities model so gogo can be resolved > > > Key: FELIX-5970 > URL: https://issues.apache.org/jira/browse/FELIX-5970 > Project: Felix > Issue Type: Improvement > Components: Gogo Command, Gogo JLine, Gogo Runtime, Gogo Shell >Reporter: Raymond Augé >Assignee: Raymond Augé >Priority: Major > Fix For: gogo.command-1.1.0, gogo.runtime-1.1.2, > gogo.shell-1.1.2, gogo.jline-1.1.2 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FELIX-5970) Add requirement & capabilities model so gogo can be resolved
[ https://issues.apache.org/jira/browse/FELIX-5970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16726887#comment-16726887 ] Raymond Augé commented on FELIX-5970: - No, it's fine I can add them. Thanks for the input. > Add requirement & capabilities model so gogo can be resolved > > > Key: FELIX-5970 > URL: https://issues.apache.org/jira/browse/FELIX-5970 > Project: Felix > Issue Type: Improvement > Components: Gogo Command, Gogo JLine, Gogo Runtime, Gogo Shell >Reporter: Raymond Augé >Assignee: Raymond Augé >Priority: Major > Fix For: gogo.command-1.1.0, gogo.runtime-1.1.2, > gogo.shell-1.1.2, gogo.jline-1.1.2 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)