Test Jackrabbit in OSGi
authorMathieu Baudier <mbaudier@argeo.org>
Wed, 18 Nov 2009 21:26:47 +0000 (21:26 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Wed, 18 Nov 2009 21:26:47 +0000 (21:26 +0000)
git-svn-id: https://svn.argeo.org/commons/trunk@3103 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

sandbox/runtime/org.argeo.sandbox.jackrabbit/pom.xml
sandbox/runtime/org.argeo.sandbox.jackrabbit/src/main/java/jcr/Base.java

index c15555080a8b6d626ac73c5f9d8958bf6d9d450e..ad80ef727871c63d8ad8fd404827065c502d176f 100644 (file)
@@ -8,11 +8,39 @@
                <relativePath>..</relativePath>
        </parent>
        <artifactId>org.argeo.sandbox.jackrabbit</artifactId>
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.argeo.maven.plugins</groupId>
+                               <artifactId>maven-argeo-osgi-plugin</artifactId>
+                               <version>${version.maven-argeo-osgi}</version>
+                               <extensions>true</extensions>
+                               <configuration>
+                                       <bundlesPomArtifactId>org.argeo.server.demo</bundlesPomArtifactId>
+                                       <execDir>target/exec</execDir>
+                                       <osgiBootArtifactId>org.argeo.osgi.boot</osgiBootArtifactId>
+                                       <argsToAppend>
+                                               <arg>-clean</arg>
+                                       </argsToAppend>
+                                       <systemProperties>
+                                               <slc.osgi.start>
+                                                       org.springframework.osgi.extender,
+                                                       org.argeo.server.jackrabbit.repo
+                                               </slc.osgi.start>
+                                               <slc.osgi.bundles>
+                                                       ${basedir}/../../../server/modules;in=*;ex=pom.xml;ex=target;ex=.*,
+                                                       ${basedir}/../../../server/demo;in=*;ex=pom.xml;ex=target;ex=.*,
+                                               </slc.osgi.bundles>
+                                       </systemProperties>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
        <dependencies>
                <dependency>
                        <groupId>org.argeo.dep.osgi</groupId>
                        <artifactId>org.argeo.dep.osgi.jackrabbit</artifactId>
-                       <version>1.6.0.0001</version>
+                       <version>1.6.0.0002-SNAPSHOT</version>
                </dependency>
                <dependency>
                        <groupId>org.argeo.commons.basic</groupId>
                        <artifactId>com.springsource.org.apache.derby</artifactId>
                        <version>10.5.1000001.764942</version>
                </dependency>
+
+               <!-- TEST -->
+               <dependency>
+                       <groupId>org.argeo.commons.osgi</groupId>
+                       <artifactId>org.argeo.osgi.boot</artifactId>
+                       <version>0.1.2-SNAPSHOT</version>
+                       <scope>test</scope>
+               </dependency>
+               <!-- Spring -->
+               <dependency>
+                       <groupId>org.springframework.osgi</groupId>
+                       <artifactId>org.springframework.osgi.extender</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.xerces</groupId>
+                       <artifactId>com.springsource.org.apache.xerces</artifactId>
+               </dependency>
        </dependencies>
 </project>
\ No newline at end of file
index 1ae0094fccc42f6dea386cb0d87b640a554a9440..61cecfd5a44e3ce43ceb8204e636f94b7b30c04c 100644 (file)
@@ -1,10 +1,14 @@
 package jcr;
 
-import org.apache.jackrabbit.core.TransientRepository;
-
-import javax.jcr.*;
 import java.io.IOException;
 
+import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.SimpleCredentials;
+
+import org.apache.jackrabbit.core.TransientRepository;
+
 public abstract class Base {
     public Repository getRepository() throws IOException {
         return new TransientRepository();