You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by ju...@apache.org on 2010/12/09 14:05:53 UTC
svn commit: r1043955 - in /jackrabbit/sandbox/osgi: ./ jackrabbit-bundle-it/
jackrabbit-bundle-it/src/ jackrabbit-bundle-it/src/test/
jackrabbit-bundle-it/src/test/java/ jackrabbit-bundle-it/src/test/java/org/
jackrabbit-bundle-it/src/test/java/org/apa...
Author: jukka
Date: Thu Dec 9 13:05:52 2010
New Revision: 1043955
URL: http://svn.apache.org/viewvc?rev=1043955&view=rev
Log:
JCR-2608: Making Jackrabbit content repo usable from OSGi (Equinox)
Add an OSGi bundling experiment in sandbox. WIP...
Added:
jackrabbit/sandbox/osgi/
jackrabbit/sandbox/osgi/jackrabbit-bundle/
jackrabbit/sandbox/osgi/jackrabbit-bundle-it/
jackrabbit/sandbox/osgi/jackrabbit-bundle-it/pom.xml (with props)
jackrabbit/sandbox/osgi/jackrabbit-bundle-it/src/
jackrabbit/sandbox/osgi/jackrabbit-bundle-it/src/test/
jackrabbit/sandbox/osgi/jackrabbit-bundle-it/src/test/java/
jackrabbit/sandbox/osgi/jackrabbit-bundle-it/src/test/java/org/
jackrabbit/sandbox/osgi/jackrabbit-bundle-it/src/test/java/org/apache/
jackrabbit/sandbox/osgi/jackrabbit-bundle-it/src/test/java/org/apache/jackrabbit/
jackrabbit/sandbox/osgi/jackrabbit-bundle-it/src/test/java/org/apache/jackrabbit/test/
jackrabbit/sandbox/osgi/jackrabbit-bundle-it/src/test/java/org/apache/jackrabbit/test/osgi/
jackrabbit/sandbox/osgi/jackrabbit-bundle-it/src/test/java/org/apache/jackrabbit/test/osgi/BundleTest.java (with props)
jackrabbit/sandbox/osgi/jackrabbit-bundle/pom.xml (with props)
jackrabbit/sandbox/osgi/jackrabbit-bundle/src/
jackrabbit/sandbox/osgi/jackrabbit-bundle/src/main/
jackrabbit/sandbox/osgi/jackrabbit-bundle/src/main/resources/
jackrabbit/sandbox/osgi/jackrabbit-bundle/src/main/resources/OSGI-INF/
jackrabbit/sandbox/osgi/jackrabbit-bundle/src/main/resources/OSGI-INF/jackrabbit-repository-factory.xml (with props)
jackrabbit/sandbox/osgi/pom.xml (with props)
Added: jackrabbit/sandbox/osgi/jackrabbit-bundle-it/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/osgi/jackrabbit-bundle-it/pom.xml?rev=1043955&view=auto
==============================================================================
--- jackrabbit/sandbox/osgi/jackrabbit-bundle-it/pom.xml (added)
+++ jackrabbit/sandbox/osgi/jackrabbit-bundle-it/pom.xml Thu Dec 9 13:05:52 2010
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+<!-- ====================================================================== -->
+<!-- P R O J E C T D E S C R I P T I O N -->
+<!-- ====================================================================== -->
+ <parent>
+ <groupId>org.apache.jackrabbit</groupId>
+ <artifactId>jackrabbit-parent</artifactId>
+ <version>2.3-SNAPSHOT</version>
+ <relativePath/>
+ </parent>
+ <artifactId>jackrabbit-bundle-it</artifactId>
+ <name>Jackrabbit OSGi integration tests</name>
+
+ <properties>
+ <pax.exam.version>1.2.2</pax.exam.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>javax.jcr</groupId>
+ <artifactId>jcr</artifactId>
+ <version>2.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.jackrabbit</groupId>
+ <artifactId>jackrabbit-jcr-commons</artifactId>
+ <version>2.3-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.jackrabbit</groupId>
+ <artifactId>jackrabbit-bundle</artifactId>
+ <version>2.3-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tika</groupId>
+ <artifactId>tika-bundle</artifactId>
+ <version>0.9-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- Test tooling -->
+ <dependency>
+ <groupId>org.ops4j.pax.exam</groupId>
+ <artifactId>pax-exam</artifactId>
+ <version>${pax.exam.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.ops4j.pax.exam</groupId>
+ <artifactId>pax-exam-container-default</artifactId>
+ <version>${pax.exam.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.ops4j.pax.exam</groupId>
+ <artifactId>pax-exam-junit</artifactId>
+ <version>${pax.exam.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.4</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.ops4j.pax.exam</groupId>
+ <artifactId>maven-paxexam-plugin</artifactId>
+ <version>${pax.exam.version}</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate-depends-file</goal>
+ <goal>generate-config</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <options>
+ <profiles>ds,log</profiles>
+ </options>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Propchange: jackrabbit/sandbox/osgi/jackrabbit-bundle-it/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: jackrabbit/sandbox/osgi/jackrabbit-bundle-it/src/test/java/org/apache/jackrabbit/test/osgi/BundleTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/osgi/jackrabbit-bundle-it/src/test/java/org/apache/jackrabbit/test/osgi/BundleTest.java?rev=1043955&view=auto
==============================================================================
--- jackrabbit/sandbox/osgi/jackrabbit-bundle-it/src/test/java/org/apache/jackrabbit/test/osgi/BundleTest.java (added)
+++ jackrabbit/sandbox/osgi/jackrabbit-bundle-it/src/test/java/org/apache/jackrabbit/test/osgi/BundleTest.java Thu Dec 9 13:05:52 2010
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.jackrabbit.test.osgi;
+
+import java.util.Arrays;
+
+import javax.jcr.RepositoryFactory;
+
+import org.apache.jackrabbit.commons.JcrUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.junit.MavenConfiguredJUnit4TestRunner;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+@RunWith(MavenConfiguredJUnit4TestRunner.class)
+public class BundleTest {
+
+ @Test
+ public void testJackrabbitBundle(BundleContext context) throws Exception {
+ for (Bundle bundle : context.getBundles()) {
+ System.out.println("Bundle: " + bundle.getSymbolicName() + " " + bundle.getState());
+ }
+ for (ServiceReference reference : context.getServiceReferences(RepositoryFactory.class.getName(), null)) {
+ System.out.println("Service: " + reference);
+ }
+ System.out.println("Repository: " + JcrUtils.getRepository());
+ }
+
+}
Propchange: jackrabbit/sandbox/osgi/jackrabbit-bundle-it/src/test/java/org/apache/jackrabbit/test/osgi/BundleTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: jackrabbit/sandbox/osgi/jackrabbit-bundle/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/osgi/jackrabbit-bundle/pom.xml?rev=1043955&view=auto
==============================================================================
--- jackrabbit/sandbox/osgi/jackrabbit-bundle/pom.xml (added)
+++ jackrabbit/sandbox/osgi/jackrabbit-bundle/pom.xml Thu Dec 9 13:05:52 2010
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+<!-- ====================================================================== -->
+<!-- P R O J E C T D E S C R I P T I O N -->
+<!-- ====================================================================== -->
+ <parent>
+ <groupId>org.apache.jackrabbit</groupId>
+ <artifactId>jackrabbit-parent</artifactId>
+ <version>2.3-SNAPSHOT</version>
+ <relativePath/>
+ </parent>
+ <artifactId>jackrabbit-bundle</artifactId>
+ <packaging>bundle</packaging>
+ <name>Jackrabbit OSGi bundle</name>
+ <description>OSGi bundle of Apache Jackrabbit</description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Embed-Dependency>*</Embed-Dependency>
+ <Embed-Transitive>true</Embed-Transitive>
+ <Service-Component>
+ OSGI-INF/jackrabbit-repository-factory.xml
+ </Service-Component>
+ <Import-Package>
+ *,
+ <!-- Optional dependencies from jackrabbit-core -->
+ org.apache.jackrabbit.test;resolution:=optional,
+ <!-- Optional dependencies from jackrabbit-webdav -->
+ javax.servlet;resolution:=optional,
+ javax.servlet.http;resolution:=optional,
+ <!-- Optional dependencies from derby -->
+ org.apache.xpath;resolution:=optional,
+ org.apache.xpath.objects;resolution:=optional,
+ org.apache.xml.utils;resolution:=optional,
+ org.apache.xalan.serialize;resolution:=optional,
+ org.apache.xalan.templates;resolution:=optional,
+ org.apache.derby.impl.drda;resolution:=optional
+ </Import-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.jackrabbit</groupId>
+ <artifactId>jackrabbit-core</artifactId>
+ <version>2.3-SNAPSHOT</version>
+ <scope>provided</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.jcr</groupId>
+ <artifactId>jcr</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.tika</groupId>
+ <artifactId>tika-parsers</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.jackrabbit</groupId>
+ <artifactId>jackrabbit-jcr2dav</artifactId>
+ <version>2.3-SNAPSHOT</version>
+ <scope>provided</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.jcr</groupId>
+ <artifactId>jcr</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+
+</project>
Propchange: jackrabbit/sandbox/osgi/jackrabbit-bundle/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: jackrabbit/sandbox/osgi/jackrabbit-bundle/src/main/resources/OSGI-INF/jackrabbit-repository-factory.xml
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/osgi/jackrabbit-bundle/src/main/resources/OSGI-INF/jackrabbit-repository-factory.xml?rev=1043955&view=auto
==============================================================================
--- jackrabbit/sandbox/osgi/jackrabbit-bundle/src/main/resources/OSGI-INF/jackrabbit-repository-factory.xml (added)
+++ jackrabbit/sandbox/osgi/jackrabbit-bundle/src/main/resources/OSGI-INF/jackrabbit-repository-factory.xml Thu Dec 9 13:05:52 2010
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component name="jackrabbit-repository-factory">
+ <implementation class="org.apache.jackrabbit.core.RepositoryFactoryImpl"/>
+ <service>
+ <provide interface="javax.jcr.RepositoryFactory"/>
+ </service>
+</component>
\ No newline at end of file
Propchange: jackrabbit/sandbox/osgi/jackrabbit-bundle/src/main/resources/OSGI-INF/jackrabbit-repository-factory.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: jackrabbit/sandbox/osgi/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/osgi/pom.xml?rev=1043955&view=auto
==============================================================================
--- jackrabbit/sandbox/osgi/pom.xml (added)
+++ jackrabbit/sandbox/osgi/pom.xml Thu Dec 9 13:05:52 2010
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+<!-- ====================================================================== -->
+<!-- P R O J E C T D E S C R I P T I O N -->
+<!-- ====================================================================== -->
+ <parent>
+ <groupId>org.apache.jackrabbit</groupId>
+ <artifactId>jackrabbit-parent</artifactId>
+ <version>2.3-SNAPSHOT</version>
+ <relativePath/>
+ </parent>
+
+ <artifactId>jackrabbit-osgi</artifactId>
+ <packaging>pom</packaging>
+ <name>Jackrabbit OSGi</name>
+
+ <modules>
+ <module>jackrabbit-bundle</module>
+ <module>jackrabbit-bundle-it</module>
+ </modules>
+
+</project>
Propchange: jackrabbit/sandbox/osgi/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native