Author: ningjiang
Date: Mon Jun 30 02:25:47 2008
New Revision: 672734
URL: http://svn.apache.org/viewvc?rev=672734&view=rev
Log:
CAMEL-652 update the example-camel-cxf build.xml
Modified:
activemq/camel/trunk/examples/camel-example-cxf/README.txt
activemq/camel/trunk/examples/camel-example-cxf/build.xml
Modified: activemq/camel/trunk/examples/camel-example-cxf/README.txt
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-cxf/README.txt?rev=672734&r1=672733&r2=672734&view=diff
==============================================================================
--- activemq/camel/trunk/examples/camel-example-cxf/README.txt (original)
+++ activemq/camel/trunk/examples/camel-example-cxf/README.txt Mon Jun 30
02:25:47 2008
@@ -17,27 +17,41 @@
mvn exec:java -PWebServiceProvider
-To
-
To run the example with Ant
- a. You need to have Apache ActiveMQ and Apache CXF installed. They can be
+ a. You need to have Apache ActiveMQ , Apache CXF, Spring and Jetty
installed. They can be
downloaded from the following locations
Apache ActiveMQ
http://activemq.apache.org/
Apache CXF
http://cxf.apache.org/
+ Spring 2.5
+ http://www.springframework.org/download
+ Jetty6
+ http://dist.codehaus.org/jetty/
+
b. Export / Set home directories for the above as follows
UNIX
export ACTIVEMQ_HOME=<path to ActiveMQ install directory>
export CXF_HOME=<path to CXF install directory>
+ export SPRING_HOME=<path to Spring install directory>
+ export JETTY_HOME=<path to Jetty install directory>
Windows
set ACTIVEMQ_HOME=<path to ActiveMQ install directory>
set CXF_HOME=<path to CXF install directory>
+ set SPRING_HOME=<path to Spring install directory>
+ set JETTY_HOME=<path to Jetty install directory>
- c. To Run the example using Ant, type
+ c. To Run example of routing between different transport type using Ant, type
ant
+ To run the example of Camel transport type
+ ant runCamelTransport
+
+ To run the example of using WebServiceProvider API
+ ant runWebServiceProvider
+
+
To stop the example hit ctrl + c
To use log4j as the logging framework add this to the pom.xml:
Modified: activemq/camel/trunk/examples/camel-example-cxf/build.xml
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-cxf/build.xml?rev=672734&r1=672733&r2=672734&view=diff
==============================================================================
--- activemq/camel/trunk/examples/camel-example-cxf/build.xml (original)
+++ activemq/camel/trunk/examples/camel-example-cxf/build.xml Mon Jun 30
02:25:47 2008
@@ -7,9 +7,9 @@
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.
@@ -19,63 +19,88 @@
<project name="camel-example-cxf" default="run" basedir=".">
- <import file="../common_build.xml"/>
+ <import file="../common_build.xml"/>
- <fail unless="env.ACTIVEMQ_HOME" message="You must download ActiveMQ and set
your ACTIVEMQ_HOME to run this demo."/>
- <fail unless="env.CXF_HOME" message="You must download CXF and set your
CXF_HOME to run this demo."/>
-
- <property name="project.name" value="camel-example-cxf"/>
-
- <path id="sample.build.classpath">
- <fileset dir="${camel.lib}">
- <include name="**/camel-cxf-*.jar"/>
- <exclude name="**/*-tests.jar"/>
- </fileset>
- <path refid="camel.core.classpath"/>
- <path refid="activemq.classpath"/>
- <path refid="cxf.classpath"/>
- </path>
-
- <property name="cxf.home" value="${env.CXF_HOME}"/>
- <path id="cxf.classpath">
- <fileset dir="${cxf.home}">
- <include name="**/cxf-*.jar"/>
- </fileset>
- </path>
-
- <target name="generate.code">
- <echo level="info" message="Generating code using wsdl2java..."/>
- <wsdl2java file="hello_world.wsdl"/>
- </target>
-
- <target name="run" depends="generate.code,build"
- description="Compile and run the sample">
- <camelrun mainClass="org.apache.camel.example.cxf.CamelCxfExample"/>
- </target>
-
- <available property="wsdl.dir" value="${build.resources.dir}/wsdl"
- file="${build.resources.dir}/wsdl"/>
- <property name="wsdl.dir" location="."/>
-
- <macrodef name="wsdl2java">
- <attribute name="srcdestdir"
default="${build.dir}/generated/src/main/java"/>
- <attribute name="destdir" default="${build.classes.dir}"/>
- <attribute name="file"/>
- <attribute name="dir" default="${wsdl.dir}"/>
- <sequential>
- <mkdir dir="@{destdir}"/>
- <mkdir dir="@{srcdestdir}"/>
- <java failonerror="true"
classname="org.apache.cxf.tools.wsdlto.WSDLToJava" fork="yes">
- <classpath>
- <path refid="cxf.classpath" />
- </classpath>
- <sysproperty key="exitOnFinish" value="true"/>
- <arg value="-verbose"/>
- <arg value="-d"/>
- <arg value="@{srcdestdir}"/>
- <arg value="@{dir}/@{file}"/>
- </java>
- </sequential>
- </macrodef>
+ <fail unless="env.ACTIVEMQ_HOME" message="You must download ActiveMQ
and set your ACTIVEMQ_HOME to run this demo."/>
+ <fail unless="env.CXF_HOME" message="You must download CXF and set your
CXF_HOME to run this demo."/>
+ <fail unless="env.SPRING_HOME" message="You must download Spring2.5 and
set your CXF_HOME to run this demo."/>
+ <fail unless="env.JETTY_HOME" message="You must download Jetty6 and set
your JETTY_HOME to run this demo."/>
+
+ <property name="project.name" value="camel-example-cxf"/>
+
+ <property name="jetty.home" value="${env.JETTY_HOME}"/>
+ <path id="jetty.classpath">
+ <fileset dir="${jetty.home}/lib">
+ <include name="jetty*.jar"/>
+ <include name="**/jetty-client-*.jar"/>
+ </fileset>
+ </path>
+
+
+ <path id="sample.build.classpath">
+ <fileset dir="${camel.lib}">
+ <include name="**/camel-cxf-*.jar"/>
+ <include name="**/camel-http-*.jar"/>
+ <include name="**/camel-jetty-*.jar"/>
+ <exclude name="**/*-tests.jar"/>
+ </fileset>
+ <path refid="camel.spring.classpath"/>
+ <path refid="spring.classpath"/>
+ <path refid="jetty.classpath"/>
+ <path refid="camel.core.classpath"/>
+ <path refid="activemq.classpath"/>
+ <path refid="cxf.classpath"/>
+ </path>
+
+ <property name="cxf.home" value="${env.CXF_HOME}"/>
+ <path id="cxf.classpath">
+ <fileset dir="${cxf.home}">
+ <include name="**/cxf-*.jar"/>
+ </fileset>
+ </path>
+
+ <target name="generate.code">
+ <echo level="info" message="Generating code using
wsdl2java..."/>
+ <wsdl2java file="hello_world.wsdl"/>
+ </target>
+
+ <target name="run" depends="generate.code,build"
+ description="Compile and run the sample of camel-cxf component">
+ <camelrun
mainClass="org.apache.camel.example.cxf.CamelCxfExample" />
+ </target>
+
+ <target name="runCamelTransport" depends="generate.code,build"
+ description="Compile and run the sample of camel transport">
+ <camelrun
mainClass="org.apache.camel.example.camel.transport.CamelTransportExample" />
+ </target>
+
+ <target name="runWebServiceProvider" depends="generate.code,build"
+ description="Compile and run the sample of web sevice provider">
+ <camelrun
mainClass="org.apache.camel.example.cxf.provider.CamelCxfExample" />
+ </target>
+
+ <available property="wsdl.dir" value="${build.resources.dir}/wsdl"
file="${build.resources.dir}/wsdl" />
+ <property name="wsdl.dir" location="."/>
+
+ <macrodef name="wsdl2java">
+ <attribute name="srcdestdir"
default="${build.dir}/generated/src/main/java"/>
+ <attribute name="destdir" default="${build.classes.dir}"/>
+ <attribute name="file"/>
+ <attribute name="dir" default="${wsdl.dir}"/>
+ <sequential>
+ <mkdir dir="@{destdir}"/>
+ <mkdir dir="@{srcdestdir}"/>
+ <java failonerror="true"
classname="org.apache.cxf.tools.wsdlto.WSDLToJava" fork="yes">
+ <classpath>
+ <path refid="cxf.classpath" />
+ </classpath>
+ <sysproperty key="exitOnFinish" value="true"/>
+ <arg value="-verbose"/>
+ <arg value="-d"/>
+ <arg value="@{srcdestdir}"/>
+ <arg value="@{dir}/@{file}"/>
+ </java>
+ </sequential>
+ </macrodef>
</project>