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 14:22:00 UTC
[jira] [Comment Edited] (KARAF-5202) Groovy and groovysh
integration into Karaf console
[ https://issues.apache.org/jira/browse/KARAF-5202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16046604#comment-16046604 ]
Denis Jouvin edited comment on KARAF-5202 at 6/12/17 2:21 PM:
--------------------------------------------------------------
Here is the help of the prototype implementation I have produced:
{code}
ServiceMix-5.0.0:7412003A@root> groovy --help
DESCRIPTION
sncf:groovy
Run an interactive Groovy session (use ":exit" to return to Karaf console)
SYNTAX
sncf:groovy [options]
OPTIONS
--command, -c
Execute the given Groovy command, without entering interactive shell
Exclusive with the -s (--script) and -l (--load) options
--help
Display this help message
--enable-package-loading
Enable packages pre-loading (disabled by default since very slow in OSGi)
--reset-shell
Reset the Groovysh shell (new instance)
--reference, -r
Resolve and assign OSGi service(s) in Groovy shell variables, in the form
serviceName1=serviceInterface1(ldapFilter1),serviceName2=serviceInterface2(ldapFilter2),...
The LDAP filter is optional. Only the best matching service found is returned.
(defaults to )
--import, -i
Imports the specified packages or classes into Groovy, in the form qualifiedName1,qualifiedName2,...
(defaults to )
--load, -l
Execute the given Groovy script list, in the form scriptUrlOrPath1,scriptUrlOrPath2,... by loading them to an interactive Groovy shell
Equivalent to the Groovy :load command. Exclusive with -c (--command) and -s (--script) options
--variable, -v
Import specific Karaf variables in Groovy shell, in the form variableName1,variableName2,...
(defaults to )
--script, -s
Execute the given Groovy script, in a separate Groovy dedicated (non interactive) interpreter
Exclusive with -c (--command) and -l (--load) options
{code}
was (Author: djouvin):
Here is the help of the prototype implementation Ive produced:
{code}
ServiceMix-5.0.0:7412003A@root> groovy --help
DESCRIPTION
sncf:groovy
Run an interactive Groovy session (use ":exit" to return to Karaf console)
SYNTAX
sncf:groovy [options]
OPTIONS
--command, -c
Execute the given Groovy command, without entering interactive shell
Exclusive with the -s (--script) and -l (--load) options
--help
Display this help message
--enable-package-loading
Enable packages pre-loading (disabled by default since very slow in OSGi)
--reset-shell
Reset the Groovysh shell (new instance)
--reference, -r
Resolve and assign OSGi service(s) in Groovy shell variables, in the form
serviceName1=serviceInterface1(ldapFilter1),serviceName2=serviceInterface2(ldapFilter2),...
The LDAP filter is optional. Only the best matching service found is returned.
(defaults to )
--import, -i
Imports the specified packages or classes into Groovy, in the form qualifiedName1,qualifiedName2,...
(defaults to )
--load, -l
Execute the given Groovy script list, in the form scriptUrlOrPath1,scriptUrlOrPath2,... by loading them to an interactive Groovy shell
Equivalent to the Groovy :load command. Exclusive with -c (--command) and -s (--script) options
--variable, -v
Import specific Karaf variables in Groovy shell, in the form variableName1,variableName2,...
(defaults to )
--script, -s
Execute the given Groovy script, in a separate Groovy dedicated (non interactive) interpreter
Exclusive with -c (--command) and -l (--load) options
{code}
> 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.
> 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.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)