You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2014/05/22 18:33:02 UTC

[jira] [Comment Edited] (OAK-1805) Debugging console

    [ https://issues.apache.org/jira/browse/OAK-1805?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14006094#comment-14006094 ] 

Chetan Mehrotra edited comment on OAK-1805 at 5/22/14 4:31 PM:
---------------------------------------------------------------

Patch which embed the groovysh [1] within oak-run. 

* The shell is branded for Oak
* Makes use of all the features provided by groovysh command completion, history, colored output etc
* Full power of Groovy!
* Most of current command implemented by Marcel ported
* Ability to execute script at command line itself similar to Mongo shell

Things to considers
* Requires groovy jar to be embedded increasing the size ~6 mb
* Some of commands need to be written in groovy

Sample output

{noformat}
$ java -jar oak-run-1.1-SNAPSHOT.jar console mongodb://localhost:27017/oak 
Apache Jackrabbit Oak 1.1-SNAPSHOT
Jackrabbit Oak Shell (Apache Jackrabbit Oak 1.1-SNAPSHOT, JVM: 1.6.0_45)
Type ':help' or ':h' for help.
-------------------------------------------------------------------------------------------------------------------
/> ls
:async
apps
bin
etc
/> cd 
:async           apps             bin              etc              home             jcr:system       
libs             oak:index        rep:policy       rep:repoPolicy   system           tmp              
var              
/> cd var
/var> 
{noformat}

btw I do not want to start a language war here ;). Groovy has a much more seamless integration with Java hence is more easier to integrate. Further it allows access to private variables directly which makes it easier to debug/access runtime state. If required we can a command to execute other lang from within groovy shell [2]

[1] http://groovy.codehaus.org/Groovy+Shell
[2] http://groovy.codehaus.org/JSR-223+access+to+other+JVM+languages


was (Author: chetanm):
Patch which embed the groovysh [1] within oak-run. 

* The shell is branded for Oak
* Makes use of all the features provided by groovysh command completion, history, colored output etc
* Full power of Groovy!
* Most of current command implemented by Marcel ported
* Ability to execute script at command line itself similar to Mongo shell

Sample output

{noformat}
$ java -jar oak-run-1.1-SNAPSHOT.jar console mongodb://localhost:27017/oak 
Apache Jackrabbit Oak 1.1-SNAPSHOT
Jackrabbit Oak Shell (Apache Jackrabbit Oak 1.1-SNAPSHOT, JVM: 1.6.0_45)
Type ':help' or ':h' for help.
-------------------------------------------------------------------------------------------------------------------
/> ls
:async
apps
bin
etc
/> cd 
:async           apps             bin              etc              home             jcr:system       
libs             oak:index        rep:policy       rep:repoPolicy   system           tmp              
var              
/> cd var
/var> 
{noformat}

[1] http://groovy.codehaus.org/Groovy+Shell

> Debugging console
> -----------------
>
>                 Key: OAK-1805
>                 URL: https://issues.apache.org/jira/browse/OAK-1805
>             Project: Jackrabbit Oak
>          Issue Type: New Feature
>          Components: run
>            Reporter: Jukka Zitting
>              Labels: production, tools
>         Attachments: OAK-1805-groovysh.patch
>
>
> It would be nice to for {{oak-run}} to come with a debugging console like the {{cli}} mode in {{jackrabbit-standalone}}.



--
This message was sent by Atlassian JIRA
(v6.2#6252)