You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Edgar Poce <ed...@gmail.com> on 2005/08/11 20:58:40 UTC

jcr command line client

Hi

FYI, I've just committed a command line client. It's under 
/contrib/jcr-commands. In order use it I recommend to install the plugin 
javaapp from 
http://maven-plugins.sourceforge.net/maven-javaapp-plugin/index.html, it 
will build a single runnable jar. See the instructions under 
/jcr-commands/README.txt.

As I commented in a previous thread the commands can be used to 
benchmark jackrabbit with jmeter. I updated the jmeter plugin, it's 
under /jcr-commands/jmeter-chain. And there's a test plan example under 
/jcr-commands/benchmarking that simulates a single user writing and 2 
users reading concurrently. It's not a real life test plan, it's just an 
example of how to build one.

As always, feedback is highly appreciated. If it doesn't work please let 
me know, it's all my fault, I can't blame the sun because it's pretty 
cold in this part of the globe ;).

br,
edgar

Re: jcr command line client

Posted by Edgar Poce <ed...@gmail.com>.
Hi brian
 I uploaded the latest changes that support batch mode. see more comments bellow

On 9/30/05, Brian Moseley <bc...@osafoundation.org> wrote:
> i installed version 1.3.1 of the javaapp plugin and ran 'maven' to
> build. running the jar gives me: 'Failed to load Main-Class manifest
> attribute from jcr-commands-1.0-dev.jar'. am i doing something wrong?
> thanks!
>

the problem with your previous attempt to run the cli was that you
built the runnable jar called jcr-commands-1.0-dev-app.jar but you
tried to run the jar built by default by maven.
You have to run the goal "javaapp" and run the xxx-app.jar . the
javaapp plugin will build a single runnable jar called
"jcr-commands-1.0-dev-app.jar" that includes all the dependencies
(jackrabbit, jcr-rmi, etc) and will create the manifest file pointing
to the runnable java class. see the README file.

type "help" in the interactive mode to get the list of available
commands and type "help <command name>" to get a command's detailed
description. I copied some texts from the spec but I soon realized
that it might be illegal, is it? could anyone tell me if I can just
copy some descriptions from the spec?, so unfortunately for you ;) I
wrote most of the bundle. I'll review it asap. I warn you that it's
not thorougly tested, see the TODO file

regarding a recent post of yours, I let you know that it includes a
command for registering  namespaces and I plan to implement one for
registering node types soon.

br,
edgar

Re: jcr command line client

Posted by Brian Moseley <bc...@osafoundation.org>.
Edgar Poce wrote:

> yes, I think the import command is already in the repo.

ah, i hadn't looked :)

> there's a command that allows to run a script. I think I could add a
> noninteractive mode that passes the script as the only parameter.
> WDYT?
> 
> the call would be something like:
> 
> java -jar jcr-commands-xxxx.jar -script myscript.jcr
> 
> and the myscript.jcr...
> 
> startjackrabbit /repository.xml /repository
> importxml xmlview.xml
> stopjackrabbit

sounds perfect!

Re: jcr command line client

Posted by Edgar Poce <ed...@gmail.com>.
On 9/30/05, Brian Moseley <bc...@osafoundation.org> wrote:
> Brian Moseley wrote:
>
> > i will wait then :) will the new version support xml import?
>
yes, I think the import command is already in the repo.

> oh, also, will the new version have a non-interactive mode?
>
> i would love to be able to very simply invoke the jar and feed it an xml
> docview file to import into the repository :)
>

there's a command that allows to run a script. I think I could add a
noninteractive mode that passes the script as the only parameter.
WDYT?

the call would be something like:

java -jar jcr-commands-xxxx.jar -script myscript.jcr

and the myscript.jcr...

startjackrabbit /repository.xml /repository
importxml xmlview.xml
stopjackrabbit

br,
edgar

Re: jcr command line client

Posted by Brian Moseley <bc...@osafoundation.org>.
Brian Moseley wrote:

> i will wait then :) will the new version support xml import?

oh, also, will the new version have a non-interactive mode?

i would love to be able to very simply invoke the jar and feed it an xml 
docview file to import into the repository :)

Re: jcr command line client

Posted by Brian Moseley <bc...@osafoundation.org>.
Edgar Poce wrote:

> Everything works fine for me when I run maven javaapp. I'm using java
> 5, maven 1.0.2 and javaapp 1.3.1. anyway, I plan to commit this
> weekend a new version with many changes, it will include most of the
> jcr api operations. I recommend you to wait a couple of days, the svn
> has early code that I wrote to build a proptotype for benchmarking
> jackrabbit in jmeter.

i will wait then :) will the new version support xml import?

Re: jcr command line client

Posted by Edgar Poce <ed...@gmail.com>.
Hi brian

On 9/30/05, Brian Moseley <bc...@osafoundation.org> wrote:
> i installed version 1.3.1 of the javaapp plugin and ran 'maven' to
> build. running the jar gives me: 'Failed to load Main-Class manifest
> attribute from jcr-commands-1.0-dev.jar'. am i doing something wrong?
> thanks!
>

Everything works fine for me when I run maven javaapp. I'm using java
5, maven 1.0.2 and javaapp 1.3.1. anyway, I plan to commit this
weekend a new version with many changes, it will include most of the
jcr api operations. I recommend you to wait a couple of days, the svn
has early code that I wrote to build a proptotype for benchmarking
jackrabbit in jmeter.

br,
edgar

Re: jcr command line client

Posted by Brian Moseley <bc...@osafoundation.org>.
Edgar Poce wrote:

> FYI, I've just committed a command line client. It's under 
> /contrib/jcr-commands. In order use it I recommend to install the plugin 
> javaapp from 
> http://maven-plugins.sourceforge.net/maven-javaapp-plugin/index.html, it 
> will build a single runnable jar. See the instructions under 
> /jcr-commands/README.txt.

i installed version 1.3.1 of the javaapp plugin and ran 'maven' to 
build. running the jar gives me: 'Failed to load Main-Class manifest 
attribute from jcr-commands-1.0-dev.jar'. am i doing something wrong? 
thanks!

Re: jcr command line client

Posted by Torsten Schlabach <ts...@apache.org>.
Edgar,

I was waiting for that and I will try and let you know if it worked.
Thank you for your work!

Regards,
Torsten

> Hi
>
> FYI, I've just committed a command line client. It's under
> /contrib/jcr-commands. In order use it I recommend to install the plugin
> javaapp from
> http://maven-plugins.sourceforge.net/maven-javaapp-plugin/index.html, it
> will build a single runnable jar. See the instructions under
> /jcr-commands/README.txt.
>
> As I commented in a previous thread the commands can be used to
> benchmark jackrabbit with jmeter. I updated the jmeter plugin, it's
> under /jcr-commands/jmeter-chain. And there's a test plan example under
> /jcr-commands/benchmarking that simulates a single user writing and 2
> users reading concurrently. It's not a real life test plan, it's just an
> example of how to build one.
>
> As always, feedback is highly appreciated. If it doesn't work please let
> me know, it's all my fault, I can't blame the sun because it's pretty
> cold in this part of the globe ;).
>
> br,
> edgar
>