Hi,
Currently Marcel has implemented a Java based basic shell access to
Oak in OAK-1805. I have reworked the logic and used Groovysh [1] to
provide a richer shell experience.
* 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}
Adding groovy would increase size of oak-run by ~6 mb (from 27 to 34)
and also requires some of the code logic to be implemented in Groovy,
So would it be ok to apply the patch
Thoughts?
Chetan Mehrotra
PS: Details are also provided in bug note
[1] http://groovy.codehaus.org/Groovy+Shell
[2] http://groovy.codehaus.org/JSR-223+access+to+other+JVM+languages