felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r770120 [3/3] - in /felix/trunk/karaf: ./ assembly/ assembly/src/main/descriptors/ assembly/src/main/filtered-resources/etc/ deployer/ deployer/blueprint/ deployer/blueprint/src/main/java/org/apache/servicemix/kernel/deployer/ deployer/blue...
Date Thu, 30 Apr 2009 09:10:06 GMT
Added: felix/trunk/karaf/deployer/spring/src/test/java/org/apache/servicemix/kernel/deployer/spring/SpringDeploymentListenerTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/deployer/spring/src/test/java/org/apache/servicemix/kernel/deployer/spring/SpringDeploymentListenerTest.java?rev=770120&view=auto
==============================================================================
--- felix/trunk/karaf/deployer/spring/src/test/java/org/apache/servicemix/kernel/deployer/spring/SpringDeploymentListenerTest.java
(added)
+++ felix/trunk/karaf/deployer/spring/src/test/java/org/apache/servicemix/kernel/deployer/spring/SpringDeploymentListenerTest.java
Thu Apr 30 09:10:03 2009
@@ -0,0 +1,86 @@
+/**
+ *
+ * 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.servicemix.kernel.deployer.spring;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.jar.JarInputStream;
+
+import javax.xml.transform.dom.DOMSource;
+
+import junit.framework.TestCase;
+import org.apache.servicemix.kernel.deployer.spring.SpringDeploymentListener;
+import org.apache.servicemix.kernel.deployer.spring.SpringTransformer;
+
+public class SpringDeploymentListenerTest extends TestCase {
+
+    public void testPackagesExtraction() throws Exception {
+        SpringDeploymentListener l = new SpringDeploymentListener();
+        File f = new File(getClass().getClassLoader().getResource("META-INF/spring/spring-deployer.xml").toURI());
+        Set<String> pkgs = SpringTransformer.analyze(new DOMSource(SpringTransformer.parse(f.toURL())));
+        assertNotNull(pkgs);
+        assertEquals(2, pkgs.size());
+        Iterator<String> it = pkgs.iterator();
+        assertEquals("org.apache.servicemix.kernel.deployer.spring", it.next());
+        assertEquals("org.osgi.service.url", it.next());
+    }
+
+    public void testCustomManifest() throws Exception {
+        File f = File.createTempFile("smx", ".jar");
+        try {
+            OutputStream os = new FileOutputStream(f);
+            SpringTransformer.transform(getClass().getClassLoader().getResource("test.xml"),
os);
+            os.close();
+            InputStream is = new FileInputStream(f);
+            JarInputStream jar = new JarInputStream(is);
+            jar.getManifest().write(System.err);
+            is.close();
+        } finally {
+            f.delete();
+        }
+    }
+
+    public void testVersions() {
+        assertVersion("org.apache.servicemix.bundles.ant-1.7.0-1.0-m3-SNAPSHOT.jar",
+                      "org.apache.servicemix.bundles.ant-1.7.0", "1.0.0.m3-SNAPSHOT", "jar");
+        assertVersion("org.apache.activemq.core-1.0-SNAPSHOT.xml",
+                      "org.apache.activemq.core", "1.0.0.SNAPSHOT", "xml");
+        assertVersion("org.apache.activemq.core-1.0.0-SNAPSHOT.xml",
+                      "org.apache.activemq.core", "1.0.0.SNAPSHOT", "xml");
+        assertVersion("org.apache.activemq.core-1.0.0.xml",
+                      "org.apache.activemq.core", "1.0.0", "xml");
+        assertVersion("geronimo-servlet_2.5_spec-1.1.2.jar",
+                      "geronimo-servlet_2.5_spec", "1.1.2", "jar");
+        assertVersion("spring-aop-2.5.1.jar",
+                      "spring-aop", "2.5.1", "jar");
+    }
+
+    private void assertVersion(String s, String... expectedParts) {
+        String[] parts = SpringTransformer.extractNameVersionType(s);
+        assertEquals(expectedParts.length, parts.length);
+        for (int i = 0; i < expectedParts.length; i++) {
+            assertEquals(expectedParts[i], parts[i]);
+        }
+    }
+
+}

Modified: felix/trunk/karaf/deployer/spring/src/test/resources/test.xml
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/deployer/spring/src/test/resources/test.xml?rev=770120&r1=770090&r2=770120&view=diff
==============================================================================
--- felix/trunk/karaf/deployer/spring/src/test/resources/test.xml (original)
+++ felix/trunk/karaf/deployer/spring/src/test/resources/test.xml Thu Apr 30 09:10:03 2009
@@ -34,17 +34,17 @@
         Header=value
     </manifest>
 
-    <bean id="springDeploymentListener" class="org.apache.servicemix.kernel.spring.SpringDeploymentListener">
+    <bean id="springDeploymentListener" class="org.apache.servicemix.kernel.deployer.spring.SpringDeploymentListener">
 
     </bean>
 
     <osgi:service ref="springDeploymentListener">
         <osgi:interfaces>
-            <value>org.apache.servicemix.kernel.filemonitor.DeploymentListener</value>
+            <value>org.apache.servicemix.kernel.deployer.filemonitor.DeploymentListener</value>
         </osgi:interfaces>
     </osgi:service>
 
-    <bean id="springHandler" class="org.apache.servicemix.kernel.spring.SpringURLHandler"
/>
+    <bean id="springHandler" class="org.apache.servicemix.kernel.deployer.spring.SpringURLHandler"
/>
 
     <osgi:service ref="springHandler" interface="org.osgi.service.url.URLStreamHandlerService">
     	<osgi:service-properties>

Modified: felix/trunk/karaf/gshell/gshell-admin/src/main/filtered-resources/org/apache/servicemix/kernel/gshell/admin/etc/startup.properties
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/gshell/gshell-admin/src/main/filtered-resources/org/apache/servicemix/kernel/gshell/admin/etc/startup.properties?rev=770120&r1=770119&r2=770120&view=diff
==============================================================================
--- felix/trunk/karaf/gshell/gshell-admin/src/main/filtered-resources/org/apache/servicemix/kernel/gshell/admin/etc/startup.properties
(original)
+++ felix/trunk/karaf/gshell/gshell-admin/src/main/filtered-resources/org/apache/servicemix/kernel/gshell/admin/etc/startup.properties
Thu Apr 30 09:10:03 2009
@@ -25,6 +25,8 @@
 #
 org/ops4j/pax/url/pax-url-mvn/${pax.url.version}/pax-url-mvn-${pax.url.version}.jar=5
 org/ops4j/pax/url/pax-url-wrap/${pax.url.version}/pax-url-wrap-${pax.url.version}.jar=5
+org/ops4j/pax/logging/pax-logging-api/${pax.logging.version}/pax-logging-api-${pax.logging.version}.jar=8
+org/ops4j/pax/logging/pax-logging-service/${pax.logging.version}/pax-logging-service-${pax.logging.version}.jar=8
 org/apache/geronimo/specs/geronimo-servlet_2.5_spec/${geronimo.servlet.version}/geronimo-servlet_2.5_spec-${geronimo.servlet.version}.jar=10
 org/apache/servicemix/specs/org.apache.servicemix.specs.jaxp-api-1.4/${servicemix.specs.version}/org.apache.servicemix.specs.jaxp-api-1.4-${servicemix.specs.version}.jar=10
 org/apache/servicemix/bundles/org.apache.servicemix.bundles.jaxp-ri/${jaxp.ri.version}/org.apache.servicemix.bundles.jaxp-ri-${jaxp.ri.version}.jar=10
@@ -32,9 +34,7 @@
 org/apache/felix/org.apache.felix.configadmin/${felix.configadmin.version}/org.apache.felix.configadmin-${felix.configadmin.version}.jar=10
 org/apache/geronimo/specs/geronimo-annotation_1.0_spec/${geronimo.annotation.version}/geronimo-annotation_1.0_spec-${geronimo.annotation.version}.jar=10
 org/apache/felix/org.apache.felix.prefs/${felix.prefs.version}/org.apache.felix.prefs-${felix.prefs.version}.jar=10
-org/apache/servicemix/kernel/org.apache.servicemix.kernel.filemonitor/${pom.version}/org.apache.servicemix.kernel.filemonitor-${pom.version}.jar=15
-org/ops4j/pax/logging/pax-logging-api/${pax.logging.version}/pax-logging-api-${pax.logging.version}.jar=20
-org/ops4j/pax/logging/pax-logging-service/${pax.logging.version}/pax-logging-service-${pax.logging.version}.jar=20
+org/apache/servicemix/kernel/deployer/org.apache.servicemix.kernel.deployer.filemonitor/${pom.version}/org.apache.servicemix.kernel.deployer.filemonitor-${pom.version}.jar=15
 
 #
 # The rest of the services..
@@ -42,7 +42,6 @@
 org/apache/servicemix/bundles/org.apache.servicemix.bundles.jline/${jline.version}/org.apache.servicemix.bundles.jline-${jline.version}.jar=30
 org/apache/servicemix/bundles/org.apache.servicemix.bundles.aopalliance/${aopalliance.version}/org.apache.servicemix.bundles.aopalliance-${aopalliance.version}.jar=30
 org/apache/servicemix/bundles/org.apache.servicemix.bundles.cglib/${cglib.version}/org.apache.servicemix.bundles.cglib-${cglib.version}.jar=30
-org/apache/servicemix/bundles/org.apache.servicemix.bundles.mina/${mina.version}/org.apache.servicemix.bundles.mina-${mina.version}.jar=30
 org/apache/servicemix/bundles/org.apache.servicemix.bundles.oro/${oro.version}/org.apache.servicemix.bundles.oro-${oro.version}.jar=30
 org/apache/servicemix/bundles/org.apache.servicemix.bundles.commons-codec/${commons.codec.version}/org.apache.servicemix.bundles.commons-codec-${commons.codec.version}.jar=30
 org/apache/servicemix/bundles/org.apache.servicemix.bundles.commons-httpclient/${commons.httpclient.version}/org.apache.servicemix.bundles.commons-httpclient-${commons.httpclient.version}.jar=30
@@ -55,7 +54,9 @@
 org/springframework/osgi/spring-osgi-core/${spring.osgi.version}/spring-osgi-core-${spring.osgi.version}.jar=30
 org/springframework/osgi/spring-osgi-extender/${spring.osgi.version}/spring-osgi-extender-${spring.osgi.version}.jar=30
 org/springframework/osgi/spring-osgi-io/${spring.osgi.version}/spring-osgi-io-${spring.osgi.version}.jar=30
-org/apache/servicemix/kernel/org.apache.servicemix.kernel.spring/${pom.version}/org.apache.servicemix.kernel.spring-${pom.version}.jar=30
+org/apache/servicemix/kernel/deployer/org.apache.servicemix.kernel.deployer.spring/${pom.version}/org.apache.servicemix.kernel.deployer.spring-${pom.version}.jar=30
+org/apache/servicemix/kernel/deployer/org.apache.servicemix.kernel.deployer.blueprint/${pom.version}/org.apache.servicemix.kernel.deployer.blueprint-${pom.version}.jar=30
+org/apache/servicemix/kernel/deployer/org.apache.servicemix.kernel.deployer.features/${pom.version}/org.apache.servicemix.kernel.deployer.features-${pom.version}.jar=30
 org/apache/servicemix/kernel/org.apache.servicemix.kernel.management/${pom.version}/org.apache.servicemix.kernel.management-${pom.version}.jar=30
 org/apache/servicemix/kernel/gshell/org.apache.servicemix.kernel.gshell.admin/${pom.version}/org.apache.servicemix.kernel.gshell.admin-${pom.version}.jar=30
 org/apache/servicemix/kernel/gshell/org.apache.servicemix.kernel.gshell.osgi/${pom.version}/org.apache.servicemix.kernel.gshell.osgi-${pom.version}.jar=30
@@ -65,7 +66,8 @@
 org/apache/servicemix/kernel/gshell/org.apache.servicemix.kernel.gshell.packages/${pom.version}/org.apache.servicemix.kernel.gshell.packages-${pom.version}.jar=30
 org/apache/servicemix/kernel/jaas/org.apache.servicemix.kernel.jaas.config/${pom.version}/org.apache.servicemix.kernel.jaas.config-${pom.version}.jar=30
 org/apache/servicemix/kernel/jaas/org.apache.servicemix.kernel.jaas.modules/${pom.version}/org.apache.servicemix.kernel.jaas.modules-${pom.version}.jar=30
-com/google/code/sshd/sshd/${sshd.version}/sshd-${sshd.version}.jar=30
+org/apache/mina/mina-core/${mina.version}/mina-core-${mina.version}.jar=30
+org/apache/sshd/sshd-core/${sshd.version}/sshd-core-${sshd.version}.jar=30
 org/osgi/jmx/${osgi.jmx.version}/jmx-${osgi.jmx.version}.jar=30
 com/oracle/osgi/jmx-impl/${osgi.jmx.version}/jmx-impl-${osgi.jmx.version}.jar=30
 

Modified: felix/trunk/karaf/gshell/gshell-features/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/gshell/gshell-features/pom.xml?rev=770120&r1=770119&r2=770120&view=diff
==============================================================================
--- felix/trunk/karaf/gshell/gshell-features/pom.xml (original)
+++ felix/trunk/karaf/gshell/gshell-features/pom.xml Thu Apr 30 09:10:03 2009
@@ -66,11 +66,6 @@
         </dependency>
 
         <dependency>
-            <groupId>org.apache.servicemix.kernel</groupId>
-            <artifactId>org.apache.servicemix.kernel.filemonitor</artifactId>
-        </dependency>
-        
-        <dependency>
             <groupId>org.springframework.osgi</groupId>
             <artifactId>spring-osgi-core</artifactId>
         </dependency>

Modified: felix/trunk/karaf/gshell/gshell-features/src/main/resources/META-INF/spring/gshell-features.xml
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/gshell/gshell-features/src/main/resources/META-INF/spring/gshell-features.xml?rev=770120&r1=770119&r2=770120&view=diff
==============================================================================
--- felix/trunk/karaf/gshell/gshell-features/src/main/resources/META-INF/spring/gshell-features.xml
(original)
+++ felix/trunk/karaf/gshell/gshell-features/src/main/resources/META-INF/spring/gshell-features.xml
Thu Apr 30 09:10:03 2009
@@ -85,10 +85,6 @@
         <property name="featuresServiceRegistry" ref="featureServiceRegistry" />
     </bean>
 
-    <bean id="featureDeploymentListener" class="org.apache.servicemix.kernel.gshell.features.internal.FeatureDeploymentListener">
-        <property name="featuresService" ref="featuresService" />
-    </bean>
-
     <bean id="namingStrategy" class="org.apache.servicemix.kernel.gshell.features.management.DefaultNamingStrategy">
         <property name="jmxDomainName" value="org.apache.servicemix" />
     </bean>
@@ -109,8 +105,6 @@
 
     <osgi:service ref="featuresService" interface="org.apache.servicemix.kernel.gshell.features.FeaturesService"
/>
 
-    <osgi:service ref="featureDeploymentListener" interface="org.apache.servicemix.kernel.filemonitor.DeploymentListener"
/>
-
     <osgix:cm-properties id="cmProps" persistent-id="org.apache.servicemix.features">
         <prop key="featuresRepositories"></prop>
         <prop key="featuresBoot"></prop>

Modified: felix/trunk/karaf/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/pom.xml?rev=770120&r1=770119&r2=770120&view=diff
==============================================================================
--- felix/trunk/karaf/pom.xml (original)
+++ felix/trunk/karaf/pom.xml Thu Apr 30 09:10:03 2009
@@ -36,9 +36,8 @@
 
     <modules>
         <module>main</module>
-        <module>filemonitor</module>
+        <module>deployer</module>
         <module>gshell</module>
-        <module>spring</module>
         <module>jaas</module>
         <module>client</module>
         <module>management</module>
@@ -192,13 +191,23 @@
                 <version>${pom.version}</version>
             </dependency>
             <dependency>
-                <groupId>org.apache.servicemix.kernel</groupId>
-                <artifactId>org.apache.servicemix.kernel.filemonitor</artifactId>
+                <groupId>org.apache.servicemix.kernel.deployer</groupId>
+                <artifactId>org.apache.servicemix.kernel.deployer.filemonitor</artifactId>
                 <version>${pom.version}</version>
             </dependency>
             <dependency>
-                <groupId>org.apache.servicemix.kernel</groupId>
-                <artifactId>org.apache.servicemix.kernel.spring</artifactId>
+                <groupId>org.apache.servicemix.kernel.deployer</groupId>
+                <artifactId>org.apache.servicemix.kernel.deployer.spring</artifactId>
+                <version>${pom.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.servicemix.kernel.deployer</groupId>
+                <artifactId>org.apache.servicemix.kernel.deployer.blueprint</artifactId>
+                <version>${pom.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.servicemix.kernel.deployer</groupId>
+                <artifactId>org.apache.servicemix.kernel.deployer.features</artifactId>
                 <version>${pom.version}</version>
             </dependency>
             <dependency>



Mime
View raw message