You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Denis Jouvin (JIRA)" <ji...@apache.org> on 2017/06/12 15:20:00 UTC
[jira] [Updated] (KARAF-5202) Groovy and groovysh integration into
Karaf console
[ https://issues.apache.org/jira/browse/KARAF-5202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Denis Jouvin updated KARAF-5202:
--------------------------------
Description:
The idea is to integrate Groovy into Karaf as an alternative scripting and/or interactive shell language. Since Groovysh also uses JLine, integration is quite easy (pass the current Jline console/session instance to Groovysh at construction time). There are some class loading issues though since Groovy uses sometimes the TCCL even when we instruct it to use a given class loader (I opened a Groovy JIRA issue about that).
The Groovysh shell then would allow to get OSGi service reference or Blueprint/Spring context references, or execute Karaf commands. Groovysh has a very nice command completion feature that enable to discover any objet (including OSGi service instance) API at runtime, which makes it very easy to play with in a dynamic environment like Karaf. In addition, its native closures and set operations, and very concise syntaxe, facilitates its use as a shell replacement.
This open nice possibilites like exploratory programming on a live running Karaf instance, scripting, tests or analysis, etc.
Another common use case is to modify a not yet parameterized value in a Blueprint or Spring context at runtime (you can browse or access the Blueprint context components, and reinstaciate them or inject properties).
was:
The idea is to integrate Groovy into Karaf as an alternative scripting and/or interactive shell language.
The Groovysh shell then would allow to get OSGi service reference, or Blueprint/Spring context references.
This open some possibilites like exploratory programming, scripting, live tests or analysis, etc.
> Groovy and groovysh integration into Karaf console
> --------------------------------------------------
>
> Key: KARAF-5202
> URL: https://issues.apache.org/jira/browse/KARAF-5202
> Project: Karaf
> Issue Type: New Feature
> Components: karaf-shell
> Reporter: Denis Jouvin
> Assignee: Jean-Baptiste Onofré
> Priority: Minor
> Labels: Groovy, Groovysh, Karaf, ShellCommands
>
> The idea is to integrate Groovy into Karaf as an alternative scripting and/or interactive shell language. Since Groovysh also uses JLine, integration is quite easy (pass the current Jline console/session instance to Groovysh at construction time). There are some class loading issues though since Groovy uses sometimes the TCCL even when we instruct it to use a given class loader (I opened a Groovy JIRA issue about that).
> The Groovysh shell then would allow to get OSGi service reference or Blueprint/Spring context references, or execute Karaf commands. Groovysh has a very nice command completion feature that enable to discover any objet (including OSGi service instance) API at runtime, which makes it very easy to play with in a dynamic environment like Karaf. In addition, its native closures and set operations, and very concise syntaxe, facilitates its use as a shell replacement.
> This open nice possibilites like exploratory programming on a live running Karaf instance, scripting, tests or analysis, etc.
> Another common use case is to modify a not yet parameterized value in a Blueprint or Spring context at runtime (you can browse or access the Blueprint context components, and reinstaciate them or inject properties).
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)