| Work In Progress Things are changing a lot and while we will try to keep them correct on a day to day basis, these instructions are in flux. |
What should I install?
There are a number of maven modules related to JCR projects.
JCR related Modules:
- Sakai JCR API
- Sakai JCR API - Apache JackRabbit Implementation
- Sakai JCR API - Xythos Implementation
- ContentHostingService JCR Implementation
- MailArchive2
- JCR Inspector
Installation instructions will be given for all the modules on Sakai Trunk, Sakai 2.4.x, and Sakai 2.5.x. While they are roughly the same, some require significant patching due to packages that were integrated in later releases. This page contains the installation instructions for the Core JCR libraries and implementations.
JCR API: Sakai Trunk Instructions
On Sakai (trunk or 2.5.x+) the sakai-jcr-api module is part of the distribution, so it does not need to be installed separately. In the source tree this is located at sakai/jcr
NOTE: If you are using 2.4.x or lower you will need to check it out (into a maven 2 compatible source tree) and then build it like so:
svn co https://source.sakaiproject.org/svn/jcr/trunk/ jcr mvn clean install sakai:deploy -f jcr/pom.xml
JCRService Implementation.
At the moment, there are 2 choices, Jackrabbit or Xythos, you only need to install one implementation. You will need a licensed installation of Xythos to use the Xythos version.
JCService Implementation: Installing JackRabbit
The JackRabbit Implementation is now included in Sakai Trunk, but is disabled at runtime. To enable it, set the following property to true in your sakai properties.
jcr.experimental=true
| Warning about logging Jackrabbit is extremely wordy in the logs so you will probably want to reduce the logging to only the required items (WARN and higher) by adding the following to your sakai.properties # Jackrabbit logging log.config.count = 1 log.config.1 = WARN.org.apache.jackrabbit.core |
JCRService Implementation: Installing Xythos
Xythos is an alternative that can be used in place of JackRabbit. Because it is commercial, you will need a licensed Xythos installation and a JSR-170 Xythos implementation with also avilable from Xythos. Once you have your Xythos server up and running you need to perform.
svn co https://source.sakaiproject.org/contrib/tfd/trunk/xythosservice/ cd xythosservice cd deploylocalrepo # Deploy the commercial Xythos Jars into the loca maven repo sh redeploy-m2.sh <jcr4wfs directory> <xythos home directory> cd .. mvn clean install sakai:deploy pom.xml
Once that is done you need to tell the Xythos JSCService implementation where the Xythos home directory is
xythosHome@org.sakaiproject.jcr.api.JCRService.repositoryBuilder=/Users/ieb/Caret/sakai22/devcode/xythos/xythos7.0.25/
For more information, contact Ian Boston. ian AT caret DOT cam DOT ac DOT uk
Sakai 2.5.x Instructions
The JCRService is in 2.5.x and can be built in the same way as for trunk. To build and deploy the either one of the implementations you will need to modify the version numbers in the poms from M2 (or SNAPSHOT) to match your version.
Sakai 2.4.x Instructions
Installing the JCR stack on 2.4.x requires a bit more work, as it depends on changes in other modules that need to be brought back from 2.5.x and trunk. These instructions assume you already have 2.4.x built and deployed to a tomcat.
These instructions will also require the use of Maven 2. There a few ways you can build and deploy Maven 2 modules inside of Sakai 2.4.x (which is built with Maven 1).
[SAKDEV:Building and Installing Maven 2 code against Sakai 2.4.x]
Installing Sakai JCR API
There is a Maven 1 build for this.
svn co https://source.sakaiproject.org/svn/jcr/branches/sakai_2-4-x
|
While it should be deployed automatically, there have been some cases where jcr-1.0.jar did not end up tomcat/shared/lib. If you run into troubles, check to make sure it's there. |
Installing the JackRabbit Service
At one point I had a working 2.4.x build for the JackRabbit Service. However, if you are at all planning on installing the JCR based ContentHostingService, the number of dependencies that have to be brought back change and conflict. Since I assume a large number of folks may want to install this, we'll go ahead and bring back everything that could be needed.
NOTE: These need to be built with maven 2, because of interdependencies you may want to go ahead and get a full checkout of 2.5.x or trunk (cafe):
- Checkout and build the util from trunk or 2.5.x
svn co https://source.sakaiproject.org/svn/util/trunk util mvn clean install sakai:deploy -f util/pom.xml
- NOTE: If you can run the maven und from your 2.4.x util project. Otherwise, be sure to manually delete the following from your tomcat:
- tomcat/components/sakai-util-pack
- tomcat/shared/lib/sakai-util-api
- NOTE: If you can run the maven und from your 2.4.x util project. Otherwise, be sure to manually delete the following from your tomcat:
- Checkout and build the jackrabbit service
https://source.sakaiproject.org/contrib/jcr/jackrabbitservice/trunk jackrabbitservice mvn clean install sakai:deploy -f jackrabbitservice/pom.xml
Data Conversion
The utility for moving existing content hosting data from the legacy store to the JCR store is part of the core JCR ContentHosting installation. The Migration API is exposed as a Service component. The JCR Inspector has a user interface for starting and stopping the migration. We will also expose the functionality via something lower level like a quartz job or startup option.
Steve G is currently finishing this functionality in SAK-12511 and will be contacting the dev list soon to enlist folks to test it.
Comments (2)
Dec 14, 2007
James Marca says:
As someone trying to experiment with JCR/JSR170/Jackrabbit, the information on t...As someone trying to experiment with JCR/JSR-170/Jackrabbit, the information on this page seems overlaps the information on http://confluence.sakaiproject.org/confluence/display/RES/JSR-170
Okay, I am getting a clue. Everything is written down above, but I didn't get it. So here is my partially informed explanation
Sakai JCR API: JSR-170 / JCR is first and foremost an API. So you need to install this.
Sakai JCR API - Apache JackRabbit Implementation: An API can't do anything without an implementation
Sakai JCR API - Xythos Implementation: This can be ignored by anyone who does not already have a license for Xythos
ContentHostingService JCR Implementation: So above you've installed the API and its implementation. Great great, but it will do nothing unless something uses it, right? So here is an implementation of ContentHostingService that actually uses JCR and Jackrabbit.
MailArchive2: Ditto the above comment, I think
JCR Inspector: This (I think) lets you turn on the JCR stuff, and may give a path to migrate your data from the old way to the new way, but that wiki page is a bit unclear to me at the moment.
So, down to brass tacks. I had no troubles compiling and installing the JCR API with the 2.5.0 beta svn pull. But Jackrabbit is another story.
(I will file a JIRA issue on this next)
I followed the directions as listed, but I also happen to have a compiled, installed pull of svn trunk in my maven repository (tagged as SNAPSHOT version). So things ran, but I got the following error on building Jackrabbit as described above.
Looking at the various pom.xml files in jackrabbitservice, it is looking for
${sakai.version}and things went a little further, but gagged looking for org.sakaiproject:sakai-jackrabbit-impl:jar:M2 because the pom versions are schizo that way---defining SNAPSHOT as the version, but then jackrabbit-impl/pack/pom.xml is looking for dependencies called:
<dependencies> <dependency> <groupId>org.sakaiproject</groupId> <artifactId>sakai-jackrabbit-impl</artifactId> <version>${sakai.version}</version> </dependency> </dependencies>Change
${sakai.version}I haven't tested running yet.
Dec 18, 2007
Steven Githens says:
Hi James, thanks for the great feedback. Hopefully we've almost got our M2 > SN...Hi James, thanks for the great feedback.
Hopefully we've almost got our M2 -> SNAPSHOT conversion done, will be checking that over.
For developing on Sakai Trunk, the JackRabbit Implementation is now part of the Sakai Trunk distribution. It just needs to be enabled with a property (jcr.experimental = true). Will be updating the docs for that right now.
You're right, some of the information does overlap, but we're trying to keep the instructions for the ContentHostingService JCR Implementation in the Resources area. I will try to see if we can make the cut points a bit more clear.
The JCR Inspector is sort of a debugging and administrative interface to the JCR Repositor
Steve