Skip to content

Commit

Permalink
Merge branch 'master' of github.com:seam/jcr
Browse files Browse the repository at this point in the history
  • Loading branch information
johnament committed Mar 12, 2011
2 parents 0732c9f + 3c44c1c commit 4d47d9c
Show file tree
Hide file tree
Showing 6 changed files with 186 additions and 64 deletions.
112 changes: 56 additions & 56 deletions docs/src/main/docbook/en-US/jackrabbit.xml
@@ -1,56 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
JBoss, Home of Professional Open Source
Copyright [2010], Red Hat, Inc., and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="jcr-jackrabbit">
<title>Seam JCR - JackRabbit Integration</title>

<section id="jcr-jr-installation">
<title>JackRabbit Integration Installation</title>
<para>
In order to activate JackRabbit support within your application, you need to include JackRabbit on your classpath. At a minimum, the following
maven dependency must be satisfied.
</para>
<programlisting role="XML"><![CDATA[<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-core</artifactId>
<version>${jackrabbit.version}</version>
</dependency>]]>
</programlisting>
<tip>
<para>
Substitute ${jackrabbit.version} for the JackRabbit version you are running against. Currently, Seam JCR tests against 2.2.4. Please review JackRabbit documentation to determine any additional dependencies.
</para>
</tip>
</section>
<section id="jcr-jr-usage">
<title>Usage</title>
<para>
In order to use JackRabbit's Repository and Session objects in your application, you must define an injection point using the JcrRepository annotation based on JackRabbit's required configuration parameters.
</para>
<programlisting role="java"><![CDATA[
@Inject @JcrRepository(name="org.modeshape.jcr.URL",value="file:path/to/modeshape.xml?repositoryName=MyRepo")
Repository repository;
@Inject @JcrRepository(name="org.modeshape.jcr.URL",value="file:path/to/modeshape.xml?repositoryName=MyRepo")
Session session;]]></programlisting>
</section>

<!--
vim:et:ts=3:sw=3:tw=120
-->
</chapter>
<?xml version="1.0" encoding="UTF-8"?>
<!--
JBoss, Home of Professional Open Source
Copyright [2010], Red Hat, Inc., and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="jcr-jackrabbit">
<title>Seam JCR - JackRabbit Integration</title>

<section id="jcr-jr-installation">
<title>JackRabbit Integration Installation</title>
<para>
In order to activate JackRabbit support within your application, you need to include JackRabbit on your classpath. At a minimum, the following
maven dependency must be satisfied.
</para>
<programlisting role="XML"><![CDATA[<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-core</artifactId>
<version>${jackrabbit.version}</version>
</dependency>]]>
</programlisting>
<tip>
<para>
Substitute ${jackrabbit.version} for the JackRabbit version you are running against. Currently, Seam JCR tests against 2.2.4. Please review JackRabbit documentation to determine any additional dependencies.
</para>
</tip>
</section>
<section id="jcr-jr-usage">
<title>Usage</title>
<para>
In order to use JackRabbit's Repository and Session objects in your application, you must define an injection point using the JcrRepository annotation based on JackRabbit's required configuration parameters.
</para>
<programlisting role="java"><![CDATA[
@Inject @JcrRepository(name="org.apache.jackrabbit.repository.home",value="target")
Repository repository;
@Inject @JcrRepository(name="org.apache.jackrabbit.repository.home",value="target")
Session session;]]></programlisting>
</section>

<!--
vim:et:ts=3:sw=3:tw=120
-->
</chapter>
38 changes: 33 additions & 5 deletions impl/pom.xml
Expand Up @@ -46,14 +46,42 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>emma-maven-plugin</artifactId>
<executions>
<execution>
<id>instrumentation</id>
<phase>process-classes</phase>
<goals>
<goal>instrument</goal>
</goals>
<configuration>
<verbose>true</verbose>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.sonatype.maven.plugin</groupId>
<artifactId>emma4it-maven-plugin</artifactId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>complete-classpath-for-tests</id>
<phase>process-classes</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<delete dir="${project.build.directory}/classes" />
<mkdir dir="${project.build.directory}/classes" />
<copy todir="${project.build.directory}/classes" overwrite="true">
<fileset dir="${project.build.directory}/generated-classes/emma/classes">
<include name="**/*"/>
</fileset>
</copy>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down
31 changes: 31 additions & 0 deletions pom.xml
Expand Up @@ -30,6 +30,7 @@
<seam.version>3.0.0.CR1</seam.version>
<jboss.spec.version>1.0.0.CR1</jboss.spec.version>
<jcr.version>2.0</jcr.version>
<emma.version>2.0.5312</emma.version>
</properties>

<prerequisites>
Expand Down Expand Up @@ -147,6 +148,36 @@
</pluginRepository>
</pluginRepositories>
</profile>
<profile>
<id>code-coverage</id>
<dependencies>
<dependency>
<groupId>emma</groupId>
<artifactId>emma</artifactId>
<version>${emma.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${basedir}/</directory>
<includes>
<include>**/*.ec</include>
<include>**/*.em</include>
<include>**/transaction.log</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<issueManagement>
Expand Down
7 changes: 6 additions & 1 deletion tests/jackrabbit/pom.xml
Expand Up @@ -27,4 +27,9 @@
<version>${jackrabbit.core.version}</version>
</dependency>
</dependencies>
</project>
<profiles>
<profile>
<id>code-coverage</id>
</profile>
</profiles>
</project>
60 changes: 59 additions & 1 deletion tests/modeshape/pom.xml
Expand Up @@ -28,4 +28,62 @@
<scope>test</scope>
</dependency>
</dependencies>
</project>
<profiles>
<profile>
<id>code-coverage</id>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.maven.plugin</groupId>
<artifactId>emma4it-maven-plugin</artifactId>
<executions>
<execution>
<id>merge</id>
<phase>post-integration-test</phase>
<goals>
<goal>merge</goal>
</goals>
<configuration>
<searchPath>${project.parent.build.directory}/../../</searchPath>
</configuration>
</execution>
<execution>
<id>report</id>
<phase>verify</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<sourceSets>
<sourceSet>
<directory>${project.parent.build.directory}/../../impl/src/main/java</directory>
</sourceSet>
</sourceSets>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>retrieve-coverage-files</id>
<phase>post-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<copy file="${project.parent.build.directory}/../../impl/target/coverage.em"
todir="${basedir}" />
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
2 changes: 1 addition & 1 deletion tests/pom.xml
Expand Up @@ -78,4 +78,4 @@
</dependencies>
</dependencyManagement>

</project>
</project>

0 comments on commit 4d47d9c

Please sign in to comment.