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 2011/06/23 08:49:50 UTC

svn commit: r1138746 - in /camel/trunk/examples/camel-example-cxf-osgi: ./ src/main/resources/META-INF/spring/ src/profiles/ src/profiles/blueprint/ src/profiles/blueprint/OSGI-INF/ src/profiles/blueprint/OSGI-INF/blueprint/ src/profiles/spring/ src/pr...

Author: ningjiang
Date: Thu Jun 23 06:49:49 2011
New Revision: 1138746

URL: http://svn.apache.org/viewvc?rev=1138746&view=rev
Log:
CAMEL-4142 Added a blueprint profile for the camel-example-cxf-osgi

Added:
    camel/trunk/examples/camel-example-cxf-osgi/src/profiles/
    camel/trunk/examples/camel-example-cxf-osgi/src/profiles/blueprint/
    camel/trunk/examples/camel-example-cxf-osgi/src/profiles/blueprint/OSGI-INF/
    camel/trunk/examples/camel-example-cxf-osgi/src/profiles/blueprint/OSGI-INF/blueprint/
    camel/trunk/examples/camel-example-cxf-osgi/src/profiles/blueprint/OSGI-INF/blueprint/camel-context.xml
      - copied, changed from r1138705, camel/trunk/examples/camel-example-cxf-osgi/src/main/resources/META-INF/spring/camel-context.xml
    camel/trunk/examples/camel-example-cxf-osgi/src/profiles/spring/
    camel/trunk/examples/camel-example-cxf-osgi/src/profiles/spring/META-INF/
    camel/trunk/examples/camel-example-cxf-osgi/src/profiles/spring/META-INF/spring/
    camel/trunk/examples/camel-example-cxf-osgi/src/profiles/spring/META-INF/spring/camel-context.xml   (contents, props changed)
      - copied, changed from r1138705, camel/trunk/examples/camel-example-cxf-osgi/src/main/resources/META-INF/spring/camel-context.xml
Removed:
    camel/trunk/examples/camel-example-cxf-osgi/src/main/resources/META-INF/spring/camel-context.xml
Modified:
    camel/trunk/examples/camel-example-cxf-osgi/README.txt
    camel/trunk/examples/camel-example-cxf-osgi/pom.xml

Modified: camel/trunk/examples/camel-example-cxf-osgi/README.txt
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-cxf-osgi/README.txt?rev=1138746&r1=1138745&r2=1138746&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-cxf-osgi/README.txt (original)
+++ camel/trunk/examples/camel-example-cxf-osgi/README.txt Thu Jun 23 06:49:49 2011
@@ -13,6 +13,8 @@ the same port.
 
 You will need to compile this example first:
   mvn install
+If you want to test the bundle with blueprint configuration, you need to build the example with
+  mvn clean install -Pblueprint
 
 Remarks:
 - During the compilation phase, a unit test will be performed, this unit test simulates the
@@ -20,7 +22,7 @@ Remarks:
 - In Eclipse, I have used the following option when starting the junit test case. This option tells
   CXF that it must use log4j : -Dorg.apache.cxf.Logger=org.apache.cxf.common.logging.Log4jLogger
 
-To run the example on Apache ServiceMix 4.x or Apache Karaf 1.x / 2.x
+To run the example on Apache ServiceMix 4.x or Apache Karaf 2.2.x
 
   1) launch the server
   karaf.bat
@@ -32,10 +34,13 @@ To run the example on Apache ServiceMix 
  
   2) Add features required
   features:addUrl mvn:org.apache.camel.karaf/apache-camel/2.8.0/xml/features
-  features:install war
-  features:install cxf
+  features:install http
+  features:install camel-spring
   features:install camel-jaxb
   features:install camel-cxf
+  
+  if you want to test the example with blueprint, you should install 
+  features:install camel-blueprint
 
   Note: In this example we use Apache Camel 2.8.0 as the version. You should of course use the
         version number of Camel you are using.

Modified: camel/trunk/examples/camel-example-cxf-osgi/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-cxf-osgi/pom.xml?rev=1138746&r1=1138745&r2=1138746&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-cxf-osgi/pom.xml (original)
+++ camel/trunk/examples/camel-example-cxf-osgi/pom.xml Thu Jun 23 06:49:49 2011
@@ -39,10 +39,6 @@
 		</dependency>
 		<dependency>
 			<groupId>org.apache.camel</groupId>
-			<artifactId>camel-spring</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.camel</groupId>
 			<artifactId>camel-cxf</artifactId>
 		</dependency>
 		<dependency>
@@ -140,4 +136,35 @@
 			</plugin>
 		</plugins>
 	</build>
+	<profiles>
+	    <profile>
+			<id>spring</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+			<build>
+				<resources>
+					<resource>
+						<directory>${basedir}/src/profiles/spring</directory>
+					</resource>
+					<resource>
+						<directory>${basedir}/src/main/resources</directory>
+					</resource>
+				</resources>
+		    </build>
+		</profile>
+		<profile>
+			<id>blueprint</id>
+			<build>
+				<resources>
+					<resource>
+						<directory>${basedir}/src/profiles/blueprint</directory>
+					</resource>
+					<resource>
+						<directory>${basedir}/src/main/resources</directory>
+					</resource>
+				</resources>
+		    </build>
+		</profile>
+	</profiles>
 </project>

Copied: camel/trunk/examples/camel-example-cxf-osgi/src/profiles/blueprint/OSGI-INF/blueprint/camel-context.xml (from r1138705, camel/trunk/examples/camel-example-cxf-osgi/src/main/resources/META-INF/spring/camel-context.xml)
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-cxf-osgi/src/profiles/blueprint/OSGI-INF/blueprint/camel-context.xml?p2=camel/trunk/examples/camel-example-cxf-osgi/src/profiles/blueprint/OSGI-INF/blueprint/camel-context.xml&p1=camel/trunk/examples/camel-example-cxf-osgi/src/main/resources/META-INF/spring/camel-context.xml&r1=1138705&r2=1138746&rev=1138746&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-cxf-osgi/src/main/resources/META-INF/spring/camel-context.xml (original)
+++ camel/trunk/examples/camel-example-cxf-osgi/src/profiles/blueprint/OSGI-INF/blueprint/camel-context.xml Thu Jun 23 06:49:49 2011
@@ -15,22 +15,13 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 -->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:camel="http://camel.apache.org/schema/spring"
-       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/spring http://camel.apache.org/schema/spring/camel-spring.xsd
-           http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd">
-    <!--Create a new SpringBus -->
-    <import resource="classpath:META-INF/cxf/cxf.xml"/>
-    <!--Make sure the OSGi servlet transport is regirsted with the bus -->
-    <import resource="classpath:META-INF/cxf/osgi/cxf-extension-osgi.xml" />
+       xmlns:camel="http://camel.apache.org/schema/blueprint"
+       xmlns:cxf="http://camel.apache.org/schema/blueprint/cxf">
 
     <cxf:cxfEndpoint id="reportIncident"
-                     address="/camel-example-cxf-osgi/webservices/incident"
+                     address="http://localhost:9000/camel-example-cxf-osgi/webservices/incident"
                      wsdlURL="META-INF/wsdl/report_incident.wsdl"
                      serviceClass="org.apache.camel.example.reportincident.ReportIncidentEndpoint">
     </cxf:cxfEndpoint>
@@ -40,4 +31,4 @@
     <camel:camelContext id="camel">
     	<camel:routeBuilder ref="reportIncidentRoutes"/>
     </camel:camelContext>
-</beans>
\ No newline at end of file
+</blueprint>
\ No newline at end of file

Copied: camel/trunk/examples/camel-example-cxf-osgi/src/profiles/spring/META-INF/spring/camel-context.xml (from r1138705, camel/trunk/examples/camel-example-cxf-osgi/src/main/resources/META-INF/spring/camel-context.xml)
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-cxf-osgi/src/profiles/spring/META-INF/spring/camel-context.xml?p2=camel/trunk/examples/camel-example-cxf-osgi/src/profiles/spring/META-INF/spring/camel-context.xml&p1=camel/trunk/examples/camel-example-cxf-osgi/src/main/resources/META-INF/spring/camel-context.xml&r1=1138705&r2=1138746&rev=1138746&view=diff
==============================================================================
    (empty)

Propchange: camel/trunk/examples/camel-example-cxf-osgi/src/profiles/spring/META-INF/spring/camel-context.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/examples/camel-example-cxf-osgi/src/profiles/spring/META-INF/spring/camel-context.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/examples/camel-example-cxf-osgi/src/profiles/spring/META-INF/spring/camel-context.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml