chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r956249 - in /incubator/chemistry/opencmis/trunk: chemistry-opencmis-client/chemistry-opencmis-client-bindings/ chemistry-opencmis-client/chemistry-opencmis-client-impl/ chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java...
Date Sat, 19 Jun 2010 16:04:55 GMT
Author: fmui
Date: Sat Jun 19 16:04:55 2010
New Revision: 956249

URL: http://svn.apache.org/viewvc?rev=956249&view=rev
Log:
Applied patch CMIS-217

Added:
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/osgi/
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/osgi/Activator.java
Modified:
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/pom.xml
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/pom.xml
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/pom.xml
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/pom.xml

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/pom.xml
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/pom.xml?rev=956249&r1=956248&r2=956249&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/pom.xml
(original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/pom.xml
Sat Jun 19 16:04:55 2010
@@ -22,6 +22,32 @@
 
     <artifactId>chemistry-opencmis-client-bindings</artifactId>
     <name>OpenCMIS Client Bindings Implementation</name>
+    <packaging>bundle</packaging>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Export-Package>
+                          org.apache.chemistry.opencmis.client.bindings;version=${project.version},
+                          org.apache.chemistry.opencmis.client.bindings.spi.*;version=${project.version}
+                        </Export-Package>
+                        <Import-Package>
+                          org.apache.commons.codec.*;version="[1.4,2.0)",
+                          org.apache.commons.logging.*;version="[1.1,2.0)",
+                          com.sun.xml.ws.*;version="[2.1.7,3.0)";resolution:=optional,
+                          *
+                        </Import-Package>
+                        <Bundle-DocURL>${project.url}</Bundle-DocURL>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 
     <dependencies>
         <dependency>

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/pom.xml
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/pom.xml?rev=956249&r1=956248&r2=956249&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/pom.xml
(original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/pom.xml
Sat Jun 19 16:04:55 2010
@@ -22,6 +22,29 @@
 
     <artifactId>chemistry-opencmis-client-impl</artifactId>
     <name>OpenCMIS Client Implementation</name>
+    <packaging>bundle</packaging>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Export-Package/>
+                        <Import-Package>
+                          org.apache.commons.codec.*;version="[1.4,2.0)",
+                          org.apache.commons.logging.*;version="[1.1,2.0)",
+                          *
+                        </Import-Package>
+                        <Bundle-DocURL>${project.url}</Bundle-DocURL>
+                        <Bundle-Activator>org.apache.chemistry.opencmis.client.osgi.Activator</Bundle-Activator>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 
     <dependencies>
         <dependency>
@@ -45,6 +68,11 @@
             <version>${project.version}</version>
         </dependency>
         <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <version>1.0.0</version>
+        </dependency>
+        <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>chemistry-opencmis-test-util</artifactId>
             <version>${project.version}</version>

Added: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/osgi/Activator.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/osgi/Activator.java?rev=956249&view=auto
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/osgi/Activator.java
(added)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/osgi/Activator.java
Sat Jun 19 16:04:55 2010
@@ -0,0 +1,49 @@
+/*
+ * 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.chemistry.opencmis.client.osgi;
+
+import java.util.Dictionary;
+import java.util.Hashtable;
+
+import org.apache.chemistry.opencmis.client.api.SessionFactory;
+import org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+
+/**
+ * OSGi Bundle activator for the OpenCMIS client which registers an instance of
+ * the {@link SessionFactory} in the OSGi service registry.
+ */
+public class Activator implements BundleActivator {
+
+    public void start(BundleContext context) throws Exception {
+        // register the MetaTypeService now, that we are ready
+        Dictionary<String, String> props = new Hashtable<String, String>();
+        props.put(Constants.SERVICE_DESCRIPTION, "Apache Chemistry OpenCMIS Client Session
Factory");
+        props.put(Constants.SERVICE_VENDOR, "Apache Software Foundation");
+
+        SessionFactory sessionFactory = SessionFactoryImpl.newInstance();
+        context.registerService(SessionFactory.class.getName(), sessionFactory, props);
+    }
+
+    public void stop(BundleContext context) throws Exception {
+        // The SessionFactory service will be unregistered automatically
+    }
+}

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/pom.xml
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/pom.xml?rev=956249&r1=956248&r2=956249&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/pom.xml
(original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/pom.xml
Sat Jun 19 16:04:55 2010
@@ -22,5 +22,29 @@
 
     <artifactId>chemistry-opencmis-commons-api</artifactId>
     <name>OpenCMIS Commons API</name>
+    <packaging>bundle</packaging>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Export-Package>
+                          org.apache.chemistry.opencmis.commons.*;version=${project.version}
+                        </Export-Package>
+                        <Import-Package>
+                          org.apache.commons.codec.*;version="[1.4,2.0)",
+                          org.apache.commons.logging.*;version="[1.1,2.0)",
+                          *
+                        </Import-Package>
+                        <Bundle-DocURL>${project.url}</Bundle-DocURL>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 
 </project>

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/pom.xml
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/pom.xml?rev=956249&r1=956248&r2=956249&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/pom.xml
(original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/pom.xml
Sat Jun 19 16:04:55 2010
@@ -22,6 +22,7 @@
 
     <artifactId>chemistry-opencmis-commons-impl</artifactId>
     <name>OpenCMIS Commons Implementation</name>
+    <packaging>bundle</packaging>
 
     <build>
         <plugins>
@@ -48,6 +49,26 @@
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Export-Package>
+                          org.apache.chemistry.opencmis.commons.*;version=${project.version}
+                        </Export-Package>
+                        <Import-Package>
+                          org.apache.commons.codec.*;version="[1.4,2.0)",
+                          org.apache.commons.logging.*;version="[1.1,2.0)",
+                          org.apache.chemistry.opencmis.commons.*;version="[0.1,0.2)",
+                          com.sun.xml.ws.*;version="[2.1.7,3.0)";resolution:=optional,
+                          *
+                        </Import-Package>
+                        <Bundle-DocURL>${project.url}</Bundle-DocURL>
+                    </instructions>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 



Mime
View raw message