jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Jackrabbit: A simple OCM project with Maven & Eclipse (page created)
Date Mon, 03 Mar 2008 13:09:01 GMT
A simple OCM project with Maven & Eclipse (JCR) created by Christophe Lombart


This tutorial explains how to start a new OCM project with Maven 2 & Eclipse. It is based
on the tutorial [5' with Jackrabbit OCM].

h2. Install Maven 2 & Eclipse

This tutorial assumes that you have install correctly Maven 2 & Eclipse.

If it is not the case, here is the instructions to install both products :
- Download Maven 2 ([http://maven.apache.org/download.html]). See the installation instructions
on this page.
- Dowload Eclipse from [http://www.eclipse.org]
- In Eclipse, you have to create a new classpath variable called M2_REPO which references
the maven 2 repository (by default, it is the directory _$user home/.m2/repository_).

h2. Download the OCM project

You can download the OCM project from [here].

h2. Install the project

- Extract the project distribution anywhere on your local machine.
- Open a command terminal and change the current directory to the project root folder.
- Execute "mvn clean compile". This is an optional step to check if the code can be compiled

h2. Get ready for Eclipse

- Execute "mvn eclipse:eclipse" from the project root folder. By this way, you project can
be imported into Eclipse.
- Start Eclipse and import the project (menu File/import, select general/existing project
in the workspace, than select the project root directory).

Now you are ready to modify the project from Eclipse.

h2. Review the project

This project is a standalone java application (see the class org.apache.jackrabbit.ocm.Main)
which is creating, retrieving and deleting a PressRelease (see the class org.apache.jackrabbit.ocm.model.PressRelease).The
main method is quite simple, it contains the following code :


The first line registers a local Jackrabbit repository, the second will create a new [Object
Content Manager] and start the tutorial and the last one unregisters the local repository
before ending the application.

You can read the tutorial [5' with Jackrabbit OCM] to get more information on how to persist
a PressRelease object.
{info:title=Useful Information}
We will add other tutorials that will explain how to initialize correctly an [Object Content
Manager] within a web application and a Spring based application.

This message is automatically generated by Confluence

Unsubscribe or edit your notifications preferences

If you think it was sent incorrectly contact one of the administrators

If you want more information on Confluence, or have a bug to report see

View raw message