You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2009/08/22 08:41:48 UTC

svn commit: r806797 - in /camel/trunk: components/camel-cxf/src/test/java/org/apache/camel/component/cxf/util/ examples/camel-example-reportincident/ examples/camel-example-reportincident/src/test/java/org/apache/camel/example/reportincident/ parent/ p...

Author: ningjiang
Date: Sat Aug 22 06:41:47 2009
New Revision: 806797

URL: http://svn.apache.org/viewvc?rev=806797&view=rev
Log:
CAMEL-1926 upgraded the PAX-EXAME to 1.0.0

Modified:
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/util/SplitterWithXqureyTest.java
    camel/trunk/examples/camel-example-reportincident/pom.xml
    camel/trunk/examples/camel-example-reportincident/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesOSGiTest.java
    camel/trunk/parent/pom.xml
    camel/trunk/platforms/karaf/features/src/main/resources/features.xml
    camel/trunk/tests/camel-itest-osgi/pom.xml
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/MailRouteTest.java
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/VelocityTest.java
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jaxb/JaxbFallbackConverterTest.java
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/ServletComponentTest.java

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/util/SplitterWithXqureyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/util/SplitterWithXqureyTest.java?rev=806797&r1=806796&r2=806797&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/util/SplitterWithXqureyTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/util/SplitterWithXqureyTest.java Sat Aug 22 06:41:47 2009
@@ -38,6 +38,7 @@
 import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
 
 import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.builder.xml.Namespaces;
 import org.apache.camel.component.mock.MockEndpoint;
@@ -70,6 +71,16 @@
                 // split the message with namespaces defined 
                 Namespaces namespaces = new Namespaces("one", "http://camel.apache.org/schema/one");                
                 from("direct:endpoint").split().xpath("//one:other", namespaces).to("mock:result");
+                
+                from("direct:toString").split().xpath("//one:other", namespaces)
+                    .process(new Processor() {
+                        public void process(Exchange exchange) throws Exception {
+                            ElementImpl element = (ElementImpl) exchange.getIn().getBody();
+                            String message = CxfUtils.elementToString(element);
+                            exchange.getOut().setBody(message);
+                        }
+                    })
+                    .to("mock:result");
             }
         };
     }
@@ -92,6 +103,21 @@
         }
     }
     
+    @Test
+    public void testToStringProcessor() throws Exception {
+        MockEndpoint result = getMockEndpoint("mock:result");
+        result.reset();
+        result.expectedMessageCount(4);
+        template.sendBody("direct:toString", xmlData);
+        assertMockEndpointsSatisfied();
+        int i = 0;
+        for (Exchange exchange : result.getExchanges()) {
+            String message = exchange.getIn().getBody(String.class);
+            assertEquals("Get a wrong message", verifyStrings[i], message);
+            i++;
+        }
+    }
+    
    
 
 }

Modified: camel/trunk/examples/camel-example-reportincident/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-reportincident/pom.xml?rev=806797&r1=806796&r2=806797&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-reportincident/pom.xml (original)
+++ camel/trunk/examples/camel-example-reportincident/pom.xml Sat Aug 22 06:41:47 2009
@@ -33,38 +33,14 @@
     <packaging>war</packaging>
     
     <repositories>
-    <repository>
-      <id>ops4j.releases</id>
-      <url>http://repository.ops4j.org/maven2</url>
-      <snapshots>
-        <enabled>false</enabled>
-      </snapshots>
-    </repository>
-    <repository>
-      <id>ops4j.snapshots</id>
-      <url>http://repository.ops4j.org/mvn-snapshots</url>
-      <snapshots>
-        <enabled>true</enabled>
-      </snapshots>
-    </repository>
-    <repository>
-      <id>biz.aQute</id>
-      <url>http://www.aqute.biz/repo</url>
-    </repository>
-  </repositories>
-
-  <pluginRepositories>
-    <pluginRepository>
-      <id>ops4j.releases</id>
-      <url>http://repository.ops4j.org/maven2</url>
-      <snapshots>
-        <enabled>false</enabled>
-      </snapshots>
-    </pluginRepository>
-   </pluginRepositories>
-
+      <repository>
+        <id>biz.aQute</id>
+        <url>http://www.aqute.biz/repo</url>
+      </repository>
+    </repositories>
+    
 	<properties>
-		<pax-exam-version>0.6.0</pax-exam-version>
+		<pax-exam-version>1.0.0</pax-exam-version>
 		<pax-tiny-bundle-version>1.0.0</pax-tiny-bundle-version>
 	</properties>
 
@@ -137,31 +113,26 @@
 		<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-junit</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-extender-impl</artifactId>
-			<version>${pax-exam-version}</version>
 			<scope>test</scope>
 		</dependency>
 	    <dependency>
 		   <groupId>org.ops4j.pax.swissbox</groupId>
 		   <artifactId>pax-swissbox-tinybundles</artifactId>
-		   <version>1.0.0</version>
 		   <scope>test</scope>
         </dependency>
 		<dependency>

Modified: camel/trunk/examples/camel-example-reportincident/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesOSGiTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-reportincident/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesOSGiTest.java?rev=806797&r1=806796&r2=806797&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-reportincident/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesOSGiTest.java (original)
+++ camel/trunk/examples/camel-example-reportincident/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesOSGiTest.java Sat Aug 22 06:41:47 2009
@@ -88,11 +88,14 @@
                          artifactId("features").versionAsInProject().type("xml/features"),                         
                           "camel-core", "camel-osgi", "camel-spring", "camel-test", "camel-velocity",  "camel-cxf"),
             
+            // using the java mail API bundle
+            mavenBundle().groupId("org.apache.servicemix.specs").artifactId("org.apache.servicemix.specs.javamail-api-1.4").version("1.3.0"),
+                                        
+            mavenBundle().groupId("org.apache.camel").artifactId("camel-mail").versionAsInProject(),
+                          
             // Added the mock_java_mail bundle for testing
             mavenBundle().groupId("org.apache.camel.tests").artifactId("org.apache.camel.tests.mock-javamail_1.7").versionAsInProject(),
             
-            mavenBundle().groupId("org.apache.camel").artifactId("camel-mail").versionAsInProject(),
-            
             // create a customer bundle start up the report incident bundle
             bundle(newBundle().addClass(InputReportIncident.class)
                 .addClass(ObjectFactory.class)

Modified: camel/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/parent/pom.xml?rev=806797&r1=806796&r2=806797&view=diff
==============================================================================
--- camel/trunk/parent/pom.xml (original)
+++ camel/trunk/parent/pom.xml Sat Aug 22 06:41:47 2009
@@ -73,6 +73,8 @@
     <groovy-version>1.6.3</groovy-version>
     <guiceyfruit-version>2.0</guiceyfruit-version>
     <junit-version>4.4</junit-version>
+    <pax-exam-version>1.0.0</pax-exam-version>
+    <pax-tiny-bundle-version>1.0.0</pax-tiny-bundle-version>  
     <saxon-version>9.1.0.1</saxon-version>
     <scala-version>2.7.3</scala-version>
     <scala-plugin-version>2.9.1</scala-plugin-version>
@@ -768,6 +770,32 @@
         <version>20070112</version>
       </dependency>
 
+      <!-- optional Pax support-->
+      <dependency>
+        <groupId>org.ops4j.pax.exam</groupId>
+        <artifactId>pax-exam</artifactId>
+        <version>${pax-exam-version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.ops4j.pax.exam</groupId>
+        <artifactId>pax-exam-junit</artifactId>
+        <version>${pax-exam-version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.ops4j.pax.exam</groupId>
+        <artifactId>pax-exam-container-default</artifactId>
+        <version>${pax-exam-version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.ops4j.pax.exam</groupId>
+        <artifactId>pax-exam-junit-extender-impl</artifactId>
+        <version>${pax-exam-version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.ops4j.pax.swissbox</groupId>
+        <artifactId>pax-swissbox-tinybundles</artifactId>
+        <version>${pax-tiny-bundle-version}</version>
+      </dependency>
       <!-- optional Saxon support-->
       <dependency>
         <groupId>net.sf.saxon</groupId>

Modified: camel/trunk/platforms/karaf/features/src/main/resources/features.xml
URL: http://svn.apache.org/viewvc/camel/trunk/platforms/karaf/features/src/main/resources/features.xml?rev=806797&r1=806796&r2=806797&view=diff
==============================================================================
--- camel/trunk/platforms/karaf/features/src/main/resources/features.xml (original)
+++ camel/trunk/platforms/karaf/features/src/main/resources/features.xml Sat Aug 22 06:41:47 2009
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <features>
   <feature name='camel-core' version='${pom.version}'>
-    <bundle>mvn:javax.activation/com.springsource.javax.activation/${spring-javax-activation-version}</bundle>
+    <bundle>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/${servicemix-specs-version}</bundle>
     <bundle>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxb-api-2.1/${servicemix-specs-version}</bundle>
     <bundle>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.stax-api-1.0/${servicemix-specs-version}</bundle>
     <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl/${jaxb-bundle-version}</bundle>
@@ -54,7 +54,7 @@
     <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.velocity/${velocity-bundle-version}</bundle>
     <bundle>mvn:org.apache.ws.commons.axiom/axiom-impl/${axiom-version}</bundle>
     <bundle>mvn:org.apache.ws.commons.axiom/axiom-api/${axiom-version}</bundle>
-    <bundle>mvn:javax.mail/com.springsource.javax.mail/${spring-javax-mail-version}</bundle>
+    <bundle>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.javamail-api-1.4/${servicemix-specs-version}</bundle> 
     <bundle>mvn:org.apache.neethi/neethi/${neethi-version}</bundle>
     <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.abdera/${abdera-bundle-version}</bundle>
     <bundle>mvn:org.apache.geronimo.specs/geronimo-jaxws_2.1_spec/${geronimo-jaxws-spec-version}</bundle>
@@ -309,6 +309,7 @@
   <feature name='camel-mail' version='${pom.version}'>
     <bundle>mvn:org.springframework/spring-context/${spring-version}</bundle>
     <bundle>mvn:org.springframework/spring-context-support/${spring-version}</bundle>
+    <bundle>mvn:javax.activation/com.springsource.javax.activation/${spring-javax-activation-version}</bundle>
     <bundle>mvn:javax.mail/com.springsource.javax.mail/${spring-javax-mail-version}</bundle>
     <feature version='${pom.version}'>camel-core</feature>
     <bundle>mvn:org.apache.camel/camel-mail/${pom.version}</bundle>

Modified: camel/trunk/tests/camel-itest-osgi/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/pom.xml?rev=806797&r1=806796&r2=806797&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/pom.xml (original)
+++ camel/trunk/tests/camel-itest-osgi/pom.xml Sat Aug 22 06:41:47 2009
@@ -32,70 +32,41 @@
   <description>Performs OSGi compliance integration tests</description>
 
   <properties>
-    <pax-exam-version>0.6.0</pax-exam-version>
+    <pax-exam-version>1.0.0</pax-exam-version>
     <pax-tiny-bundle-version>1.0.0</pax-tiny-bundle-version>  
   </properties>
 
   <repositories>
     <repository>
-      <id>ops4j.releases</id>
-      <url>http://repository.ops4j.org/maven2</url>
-      <snapshots>
-        <enabled>false</enabled>
-      </snapshots>
-    </repository>
-    <repository>
-      <id>ops4j.snapshots</id>
-      <url>http://repository.ops4j.org/mvn-snapshots</url>
-      <snapshots>
-        <enabled>true</enabled>
-      </snapshots>
-    </repository>
-    <repository>
       <id>biz.aQute</id>
       <url>http://www.aqute.biz/repo</url>
     </repository>
   </repositories>
 
-  <pluginRepositories>
-    <pluginRepository>
-      <id>ops4j.releases</id>
-      <url>http://repository.ops4j.org/maven2</url>
-      <snapshots>
-        <enabled>false</enabled>
-      </snapshots>
-    </pluginRepository>
-  </pluginRepositories>
-
   <dependencies>
     <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-junit</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-extender-impl</artifactId>
-      <version>${pax-exam-version}</version>
       <scope>test</scope>
     </dependency>
 	<dependency>
 		<groupId>org.ops4j.pax.swissbox</groupId>
 		<artifactId>pax-swissbox-tinybundles</artifactId>
-		<version>1.0.0</version>
 		<scope>test</scope>
 	</dependency>
 	<dependency>

Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/MailRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/MailRouteTest.java?rev=806797&r1=806796&r2=806797&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/MailRouteTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/MailRouteTest.java Sat Aug 22 06:41:47 2009
@@ -123,8 +123,6 @@
     @Configuration
     public static Option[] configure() {
         Option[] options = options(
-            // install log service using pax runners profile abstraction (there are more profiles, like DS)
-            //logProfile().version("1.3.0"),
             // install the spring dm profile            
             profile("spring.dm").version("1.2.0"), 
             // this is how you set the default log level when using pax logging (logProfile)

Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java?rev=806797&r1=806796&r2=806797&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java Sat Aug 22 06:41:47 2009
@@ -62,8 +62,6 @@
     @Configuration
     public static Option[] configure() {
         Option[] options = options(
-            // install log service using pax runners profile abstraction (there are more profiles, like DS)
-            logProfile().version("1.3.0"),
             // install the spring dm profile            
             profile("spring.dm").version("1.2.0"),    
             // this is how you set the default log level when using pax logging (logProfile)

Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/VelocityTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/VelocityTest.java?rev=806797&r1=806796&r2=806797&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/VelocityTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/VelocityTest.java Sat Aug 22 06:41:47 2009
@@ -71,8 +71,6 @@
     @Configuration
     public static Option[] configure() {
         Option[] options = options(
-            // install log service using pax runners profile abstraction (there are more profiles, like DS)
-            logProfile().version("1.3.0"),
             // install the spring dm profile            
             profile("spring.dm").version("1.2.0"),    
             // this is how you set the default log level when using pax logging (logProfile)

Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jaxb/JaxbFallbackConverterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jaxb/JaxbFallbackConverterTest.java?rev=806797&r1=806796&r2=806797&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jaxb/JaxbFallbackConverterTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jaxb/JaxbFallbackConverterTest.java Sat Aug 22 06:41:47 2009
@@ -65,8 +65,7 @@
     @Configuration
     public static Option[] configure() {
         Option[] options = options(
-            // install log service using pax runners profile abstraction (there are more profiles, like DS)
-            logProfile().version("1.3.0"),
+           
             // install the spring dm profile            
             profile("spring.dm").version("1.2.0"),    
             // this is how you set the default log level when using pax logging (logProfile)

Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/ServletComponentTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/ServletComponentTest.java?rev=806797&r1=806796&r2=806797&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/ServletComponentTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/ServletComponentTest.java Sat Aug 22 06:41:47 2009
@@ -55,8 +55,7 @@
     @Configuration
     public static Option[] configure() {
         Option[] options = options(
-            // install log service using pax runners profile abstraction (there are more profiles, like DS)
-            logProfile().version("1.3.0"),
+           
             // install the spring dm profile            
             profile("spring.dm").version("1.2.0"),
             // set the system property for pax web