You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2011/08/12 11:00:28 UTC

svn commit: r1157016 - in /karaf/sandbox/jbonofre/cave/trunk: assembly/ assembly/src/main/resources/ server/backend/filesystem/src/main/resources/OSGI-INF/blueprint/ server/rest/

Author: jbonofre
Date: Fri Aug 12 09:00:28 2011
New Revision: 1157016

URL: http://svn.apache.org/viewvc?rev=1157016&view=rev
Log:
Add ConfigAdmin usage in Cave filesystem backend.

Added:
    karaf/sandbox/jbonofre/cave/trunk/assembly/src/main/resources/filesystem.cfg
Modified:
    karaf/sandbox/jbonofre/cave/trunk/assembly/pom.xml
    karaf/sandbox/jbonofre/cave/trunk/assembly/src/main/resources/features.xml
    karaf/sandbox/jbonofre/cave/trunk/server/backend/filesystem/src/main/resources/OSGI-INF/blueprint/cave-filesystem-backend.xml
    karaf/sandbox/jbonofre/cave/trunk/server/rest/pom.xml

Modified: karaf/sandbox/jbonofre/cave/trunk/assembly/pom.xml
URL: http://svn.apache.org/viewvc/karaf/sandbox/jbonofre/cave/trunk/assembly/pom.xml?rev=1157016&r1=1157015&r2=1157016&view=diff
==============================================================================
--- karaf/sandbox/jbonofre/cave/trunk/assembly/pom.xml (original)
+++ karaf/sandbox/jbonofre/cave/trunk/assembly/pom.xml Fri Aug 12 09:00:28 2011
@@ -82,6 +82,11 @@
                                     <type>xml</type>
                                     <classifier>features</classifier>
                                 </artifact>
+                                <artifact>
+                                    <file>target/classes/filesystem.cfg</file>
+                                    <type>cfg</type>
+                                    <classifier>filesystem</classifier>
+                                </artifact>
                             </artifacts>
                         </configuration>
                     </execution>

Modified: karaf/sandbox/jbonofre/cave/trunk/assembly/src/main/resources/features.xml
URL: http://svn.apache.org/viewvc/karaf/sandbox/jbonofre/cave/trunk/assembly/src/main/resources/features.xml?rev=1157016&r1=1157015&r2=1157016&view=diff
==============================================================================
--- karaf/sandbox/jbonofre/cave/trunk/assembly/src/main/resources/features.xml (original)
+++ karaf/sandbox/jbonofre/cave/trunk/assembly/src/main/resources/features.xml Fri Aug 12 09:00:28 2011
@@ -20,6 +20,9 @@
 
     <feature name="cave-server-filesystem-backend" version="${project.version}">
         <feature>obr</feature>
+        <configfile finalname="/etc/org.apache.karaf.cave.server.backend.filesystem.cfg">
+            mvn:org.apache.karaf.cave/apache-karaf-cave/${project.version}/cfg/filesystem
+        </configfile>
         <bundle>mvn:org.apache.karaf.cave.server.backend/org.apache.karaf.cave.server.backend.api/${project.version}</bundle>
         <bundle>mvn:org.apache.karaf.cave.server.backend/org.apache.karaf.cave.server.backend.filesystem/${project.version}</bundle>
     </feature>

Added: karaf/sandbox/jbonofre/cave/trunk/assembly/src/main/resources/filesystem.cfg
URL: http://svn.apache.org/viewvc/karaf/sandbox/jbonofre/cave/trunk/assembly/src/main/resources/filesystem.cfg?rev=1157016&view=auto
==============================================================================
--- karaf/sandbox/jbonofre/cave/trunk/assembly/src/main/resources/filesystem.cfg (added)
+++ karaf/sandbox/jbonofre/cave/trunk/assembly/src/main/resources/filesystem.cfg Fri Aug 12 09:00:28 2011
@@ -0,0 +1,23 @@
+################################################################################
+#
+#    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.
+#
+################################################################################
+
+#
+# Storage location where Apache Karaf Cave create repositories by default
+#
+storage.location=cave
\ No newline at end of file

Modified: karaf/sandbox/jbonofre/cave/trunk/server/backend/filesystem/src/main/resources/OSGI-INF/blueprint/cave-filesystem-backend.xml
URL: http://svn.apache.org/viewvc/karaf/sandbox/jbonofre/cave/trunk/server/backend/filesystem/src/main/resources/OSGI-INF/blueprint/cave-filesystem-backend.xml?rev=1157016&r1=1157015&r2=1157016&view=diff
==============================================================================
--- karaf/sandbox/jbonofre/cave/trunk/server/backend/filesystem/src/main/resources/OSGI-INF/blueprint/cave-filesystem-backend.xml (original)
+++ karaf/sandbox/jbonofre/cave/trunk/server/backend/filesystem/src/main/resources/OSGI-INF/blueprint/cave-filesystem-backend.xml Fri Aug 12 09:00:28 2011
@@ -18,11 +18,11 @@
 
 -->
 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
-           xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"
+           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
            default-activation="lazy">
 
     <bean id="caveRepositoryService" class="org.apache.karaf.cave.server.backend.impl.CaveRepositoryServiceImpl">
-        <property name="storageLocation" value="cave"/>
+        <property name="storageLocation" value="${storage.location}"/>
         <property name="repositoryAdmin" ref="repositoryAdmin"/>
     </bean>
 
@@ -30,7 +30,11 @@
 
     <service ref="caveRepositoryService" interface="org.apache.karaf.cave.server.backend.api.CaveRepositoryService"/>
 
-    <!-- allow the use of system properties -->
-    <ext:property-placeholder/>
+    <!-- use the cm of Cave filesystem backend -->
+    <cm:property-placeholder persistent-id="org.apache.karaf.cave.server.backend.filesystem" update-strategy="reload">
+        <cm:default-properties>
+            <cm:property name="storage.location" value="cave"/>
+        </cm:default-properties>
+    </cm:property-placeholder>
 
 </blueprint>
\ No newline at end of file

Modified: karaf/sandbox/jbonofre/cave/trunk/server/rest/pom.xml
URL: http://svn.apache.org/viewvc/karaf/sandbox/jbonofre/cave/trunk/server/rest/pom.xml?rev=1157016&r1=1157015&r2=1157016&view=diff
==============================================================================
--- karaf/sandbox/jbonofre/cave/trunk/server/rest/pom.xml (original)
+++ karaf/sandbox/jbonofre/cave/trunk/server/rest/pom.xml Fri Aug 12 09:00:28 2011
@@ -1,2 +1,36 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<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://mave"
\ No newline at end of file
+<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/xsd/maven-4.0.0.xsd">
+
+    <!--
+
+        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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf.cave</groupId>
+        <artifactId>org.apache.karaf.cave.server</artifactId>
+        <version>3.0.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <groupId>org.apache.karaf.cave.server</groupId>
+    <artifactId>org.apache.karaf.cave.server.rest</artifactId>
+    <name>Apache Karaf :: Cave :: Server :: REST API</name>
+    <packaging>pom</packaging>
+
+</project>
\ No newline at end of file