Monday, March 1, 2010

Jackrabbit JCR: Part 1 - Getting Started

Working at Quick Solutions, I have become an expert on the Java Content Repository. Many wish to stand-up a repository but reading through mounds of documentation is often too great a barrier. What if it were as simple as download and start? Well here you go!

Start the Repository
  1. Download jackrabbit-standalone. Unzip it.
  2. At a command prompt in the unzipped directory, type:
    > startRepo
Tools to Communicate with the Repository
  1. A Web browser. Browse to http://localhost:8123/
    Click "Browse" along the left menu.
  2. A WebDAV Client. Download AnyClient. (Freeware)

    Host: http://localhost:8123/repository/default/
    Username: admin
    Password: admin
    Connection type: WebDAV

  3. Command line. Download jcr-commands. (I can't take credit for this. License Info here.)
    At a command prompt in the unzipped bin directory, type:
    > run
    For this tool you must connect through RMI, not HTTP, so type:
    > connect rmi://localhost:1099/jackrabbit
    > login admin admin
    > ls
  4. Java Code. Download JcrTalker. Unzip it.
    At a command prompt in the unzipped directory, type (notice the trailing slash):
    > groovy JcrTalker.groovy /

(Note: The .bat files used above can easily be translated to shell scripts or Mac scripts to suit your non-windows needs.)

No comments:

Post a Comment