You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by co...@apache.org on 2008/09/04 22:02:01 UTC

[CONF] Apache Jackrabbit: A simple OCM project with Maven & Eclipse (page edited)

A simple OCM project with Maven & Eclipse (JCR) edited by Christophe Lombart
      Page: http://cwiki.apache.org/confluence/display/JCR/A+simple+OCM+project+with+Maven+%26+Eclipse
   Changes: http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=78374&originalVersion=2&revisedVersion=3

Comment:
---------------------------------------------------------------------

Review the content of this tutorial due to the modifications made in the first tutorial

Change summary:
---------------------------------------------------------------------

Review the content of this tutorial due to the modifications made in the first tutorial

Change summary:
---------------------------------------------------------------------

Review the content of this tutorial due to the modifications made in the first tutorial

Change summary:
---------------------------------------------------------------------

Review the content of this tutorial due to the modifications made in the first tutorial

Change summary:
---------------------------------------------------------------------

Review the content of this tutorial due to the modifications made in the first tutorial

Content:
---------------------------------------------------------------------

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|^5minutes.zip].

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 correctly.

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).For simplicity reason, this application is using a TransientRepository but  you can change the repository configuration from the class RepositoryUtil. 


You can read the tutorial [5' with Jackrabbit OCM] to get more information on how to  initialize the [Object Content Manager] and how to persist the PressRelease Object.


---------------------------------------------------------------------
CONFLUENCE INFORMATION
This message is automatically generated by Confluence

Unsubscribe or edit your notifications preferences
   http://cwiki.apache.org/confluence/users/viewnotifications.action

If you think it was sent incorrectly contact one of the administrators
   http://cwiki.apache.org/confluence/administrators.action

If you want more information on Confluence, or have a bug to report see
   http://www.atlassian.com/software/confluence