SeamFramework.orgCommunity Documentation

Chapter 66. Seam JCR - Introduction

66.1. Introduction
66.2. Maven dependency configuration

The Seam JCR Module aims to simplify the integration points between JCR implementations and CDI applications.

The Seam JCR module is compatible with JCR 2.0 implementations. It strictly compiles against JCR 2.0. However, test cases are executed against both ModeShape and JackRabbit to ensure compatibility.

If you are using Maven as your build tool, you can add the following single dependency to your pom.xml file to include Seam JCR:


<dependency>
   <groupId>org.jboss.seam.jcr</groupId>
   <artifactId>seam-jcr</artifactId>
   <version>${seam.jcr.version}</version>
</dependency>
        

Tip

Substitute the expression ${seam.jcr.version} with the most recent or appropriate version of Seam JCR. Alternatively, you can create a Maven user-defined property to satisfy this substitution so you can centrally manage the version.

Alternatively, you can use the API at compile time and only include the implementation at runtime. This protects you from inadvertantly depending on an implementation class.


<dependency>
   <groupId>org.jboss.seam.jcr</groupId>
   <artifactId>seam-jcr-api</artifactId>
   <version>${seam.jcr.version}</version>
   <scope>compile</scope>
</dependency>

<dependency>
   <groupId>org.jboss.seam.jcr</groupId>
   <artifactId>seam-jcr</artifactId>
   <version>${seam.jcr.version}</version>
   <scope>runtime</scope>
</dependency>
        

In addition to your Seam JCR dependencies, you must also declare a dependency on a JCR Implementation.