Author: dkulp
Date: Mon Mar 26 19:27:00 2012
New Revision: 1305505

URL: http://svn.apache.org/viewvc?rev=1305505&view=rev
Log:
Add a profile to help testing with CXF 2.6.x

Added:
    
camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpointBeans-2.6.xml
   (with props)
Modified:
    camel/trunk/components/camel-cxf/pom.xml
    
camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpointTest.java

Modified: camel/trunk/components/camel-cxf/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/pom.xml?rev=1305505&r1=1305504&r2=1305505&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/pom.xml (original)
+++ camel/trunk/components/camel-cxf/pom.xml Mon Mar 26 19:27:00 2012
@@ -316,6 +316,26 @@
   </build>
 
   <profiles>
+      <profile>
+        <id>cxf-2.6</id>
+        <properties>
+            <cxf-version>2.6.0-SNAPSHOT</cxf-version>
+        </properties>
+        <dependencies>
+            <dependency>
+              <groupId>org.apache.cxf</groupId>
+              <artifactId>cxf-rt-rs-extension-providers</artifactId>
+              <version>${cxf-version}</version>
+              <scope>test</scope>
+            </dependency>  
+          <dependency>
+            <groupId>org.codehaus.jettison</groupId>
+            <artifactId>jettison</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        </dependencies>
+      </profile>
     <profile>
       <id>fastinstall</id>
       <properties>

Modified: 
camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpointTest.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpointTest.java?rev=1305505&r1=1305504&r2=1305505&view=diff
==============================================================================
--- 
camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpointTest.java
 (original)
+++ 
camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpointTest.java
 Mon Mar 26 19:27:00 2012
@@ -20,6 +20,8 @@ import org.apache.camel.component.cxf.ja
 import org.apache.camel.component.cxf.spring.SpringJAXRSClientFactoryBean;
 import org.apache.camel.component.cxf.spring.SpringJAXRSServerFactoryBean;
 import org.apache.camel.test.junit4.CamelSpringTestSupport;
+import org.apache.cxf.version.Version;
+
 import org.junit.Test;
 import org.springframework.context.support.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -52,7 +54,11 @@ public class CxfRsSpringEndpointTest ext
     
     @Override
     protected AbstractXmlApplicationContext createApplicationContext() {
-        return new ClassPathXmlApplicationContext(new 
String("org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpointBeans.xml")); 
+        String version = Version.getCurrentVersion();
+        if (version.contains("2.5") || version.contains("2.4")) {
+            return new ClassPathXmlApplicationContext(new 
String("org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpointBeans.xml"));
+        }
+        return new ClassPathXmlApplicationContext(new 
String("org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpointBeans-2.6.xml"));
     }
 
 }

Added: 
camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpointBeans-2.6.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpointBeans-2.6.xml?rev=1305505&view=auto
==============================================================================
--- 
camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpointBeans-2.6.xml
 (added)
+++ 
camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpointBeans-2.6.xml
 Mon Mar 26 19:27:00 2012
@@ -0,0 +1,45 @@
+<?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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns:cxf="http://camel.apache.org/schema/cxf";
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
+       http://camel.apache.org/schema/cxf 
http://camel.apache.org/schema/cxf/camel-cxf.xsd
+       http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd";>
+
+
+  <cxf:rsServer id="rsServer" address="http://localhost:9000/router";
+    
serviceClass="org.apache.camel.component.cxf.jaxrs.testbean.CustomerService"
+    loggingFeatureEnabled="true" loggingSizeLimit="200">
+    <cxf:providers>
+       <ref bean="jsonProvider"/>
+    </cxf:providers>
+  </cxf:rsServer>
+
+  <cxf:rsClient id="rsClient" address="http://localhost:9002/helloworld";
+    
serviceClass="org.apache.camel.component.cxf.jaxrs.testbean.CustomerService"/>
+
+  <bean id="jsonProvider" 
class="org.apache.cxf.jaxrs.provider.json.JSONProvider"/>
+
+  <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring";>
+  </camelContext>
+  
+  
+
+</beans>

Propchange: 
camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpointBeans-2.6.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpointBeans-2.6.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpointBeans-2.6.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml


Reply via email to