Author: blin
Date: Fri Aug 17 02:03:02 2007
New Revision: 566975
URL: http://svn.apache.org/viewvc?view=rev&rev=566975
Log:
[CXF-901] Apply patch provided by Jeff Yu - Thanks, Jeff
Modified:
incubator/cxf/trunk/distribution/src/main/release/samples/README.txt
incubator/cxf/trunk/distribution/src/main/release/samples/common_build.xml
incubator/cxf/trunk/distribution/src/main/release/samples/hello_world/README.txt
incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_RPCLit/README.txt
incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_code_first/README.txt
incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_xml_bare/README.txt
incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_xml_wrapped/README.txt
incubator/cxf/trunk/distribution/src/main/release/samples/java_first_pojo/README.txt
incubator/cxf/trunk/distribution/src/main/release/samples/java_first_pojo/src/demo/hw/client/Client.java
incubator/cxf/trunk/distribution/src/main/release/samples/soap12/README.txt
incubator/cxf/trunk/distribution/src/main/release/samples/soap_header/README.txt
Modified: incubator/cxf/trunk/distribution/src/main/release/samples/README.txt
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/README.txt?view=diff&rev=566975&r1=566974&r2=566975
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/README.txt
(original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/README.txt Fri
Aug 17 02:03:02 2007
@@ -18,11 +18,6 @@
is on the CLASSPATH and to insure that the JDK, ant and
CXF_HOME/bin directories are on the PATH.
-To build and run the demos provided in the Apache CXF source distribution
-using ant you will need to edit the common_build.xml file.
-Uncomment the line:
-<import file="../../../target/srcbuild_paths.xml" optional="true"/>
-
In each of the demos, source code files for the client and
server mainlines and the Service Endpoint Interface class are
included in the src directory. The build process will write
@@ -52,7 +47,7 @@
script prior to building and running the demos.
-Basic Setup for Building and Running the Demos in a Servlet Container
+Building the Demos in a Servlet Container
=====================================================================
Since Apache CXF requires JDK/JRE 5.0, you must use a servlet container
@@ -66,13 +61,20 @@
Preparing deploy to APACHE TOMCAT
* set CATALINA_HOME environment to your TOMCAT home directory
+
+Build the WAR:
+
+Now we have two flavors WAR, one is Full WAR that included all the jars
+in the $WAR/WEB-INF/lib folder, the other is minimum WAR, which did not
+include any jars in the WAR.
+
+1)run "ant war" to build a Full WAR.
+2)run "ant war -Dwithout.libs=true" to build a minimum WAR.
-Deploy the application into APACHE TOMCAT with the commond:
-[NOTE] This step will check if the cxf jars present in Tomcat,
- if not, it will automatically copy all the jars into
CATALINA_HOME/shared/lib
+Deploy the application (Full WAR) into APACHE TOMCAT with the command:
- ant deploy -Dtomcat=true
+ ant deploy-tomcat
Undeploy the application from the APACHE TOMCAT with the command:
- ant undeploy -Dtomcat=true
+ ant undeploy-tomcat
Modified:
incubator/cxf/trunk/distribution/src/main/release/samples/common_build.xml
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/common_build.xml?view=diff&rev=566975&r1=566974&r2=566975
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/common_build.xml
(original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/common_build.xml
Fri Aug 17 02:03:02 2007
@@ -216,7 +216,8 @@
</java>
</sequential>
</macrodef>
-
+
+ <property name="war-lib" value="${basedir}/libs" />
<macrodef name="cxfwar">
<attribute name="filename"/>
<attribute name="wsdl"/>
@@ -224,6 +225,10 @@
<attribute name="classesdir" default="${build.classes.dir}"/>
<sequential>
<mkdir dir="@{dir}"/>
+ <mkdir dir="${war-lib}"/>
+ <antcall target="copy-war-libs"/>
+
+ <delete file="@{dir}/@{filename}" />
<war destfile="@{dir}/@{filename}"
webxml="${cxf.home}/etc/web.xml">
<classes dir="@{classesdir}"/>
<webinf dir="${wsdl.dir}">
@@ -232,22 +237,24 @@
<webinf dir="${wsdl.dir}/..">
<include name="wsdl/@{wsdl}"/>
</webinf>
+ <lib dir="${war-lib}">
+ <include name="*.jar"/>
+ </lib>
</war>
+
+ <delete dir="${war-lib}" />
</sequential>
</macrodef>
-
- <target name="prepare.tomcat" unless="cxf.jars.present.in.tomcat">
- <copy todir="${env.CATALINA_HOME}/shared/lib">
- <fileset dir="${cxf.home}/modules">
- <include name="*.jar"/>
- </fileset>
- </copy>
- <copy todir="${env.CATALINA_HOME}/shared/lib">
- <fileset dir="${cxf.home}/lib">
- <include name="*.jar"/>
- <exclude name="cxf-*.jar"/>
- </fileset>
- </copy>
+
+ <target name="copy-war-libs" unless="without.libs">
+ <copy todir="${war-lib}">
+ <fileset dir="${cxf.home}/lib">
+ <exclude name="servlet-api-*.jar" />
+ <exclude name="geronimo-servlet_*.jar" />
+ <exclude name="jetty-*.jar"/>
+ <exclude name="WHICH_JARS" />
+ </fileset>
+ </copy>
</target>
<target name="deploy" description="deploy the application into the
container">
@@ -256,14 +263,13 @@
</target>
<target name="undeploy" depends="undeploy-tomcat" description="undeploy
the application from the container"/>
- <target name="deploy-tomcat" if="tomcat">
+ <target name="deploy-tomcat" depends="war">
<antcall target="validate-tomcat"/>
- <antcall target="prepare.tomcat"/>
<copy file="${war.dir}/${cxf.war.file.name}.war"
todir="${env.CATALINA_HOME}/webapps"/>
</target>
- <target name="undeploy-tomcat" if="tomcat">
+ <target name="undeploy-tomcat">
<antcall target="validate-tomcat"/>
<delete file="${env.CATALINA_HOME}/webapps/${cxf.war.file.name}.war"/>
<delete dir="${env.CATALINA_HOME}/webapps/${cxf.war.file.name}"/>
@@ -271,28 +277,6 @@
<target name="validate-tomcat">
<fail unless="env.CATALINA_HOME" message="You should set the
CATALINA_HOME, if you want to deploy into tomcat"/>
-
- <condition property="cxf.jars.present.in.tomcat">
- <and>
- <available classname="org.apache.cxf.version.Version">
- <classpath>
- <fileset dir="${env.CATALINA_HOME}/shared/lib">
- <include name="*.jar"/>
- </fileset>
- </classpath>
- </available>
- <available
file="${env.CATALINA_HOME}/shared/lib/cxf-manifest-incubator.jar" type="file"/>
- </and>
- </condition>
-
- <available property="cxf.jbi.present"
classname="org.apache.cxf.jbi.transport.JBIConduit">
- <classpath>
- <fileset dir="${env.CATALINA_HOME}/shared/lib">
- <include name="*.jar"/>
- </fileset>
- </classpath>
- </available>
- <fail if="cxf.jbi.present" message="JBI API is not shipped with Apache
CXF, so you should remove all jars start with the cxf-integration-jbi from
${env.CATALINA_HOME}/shared/lib"/>
</target>
</project>
Modified:
incubator/cxf/trunk/distribution/src/main/release/samples/hello_world/README.txt
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/hello_world/README.txt?view=diff&rev=566975&r1=566974&r2=566975
==============================================================================
---
incubator/cxf/trunk/distribution/src/main/release/samples/hello_world/README.txt
(original)
+++
incubator/cxf/trunk/distribution/src/main/release/samples/hello_world/README.txt
Fri Aug 17 02:03:02 2007
@@ -131,26 +131,7 @@
Building and running the demo in a servlet container
----------------------------------------------------
-From the samples/hello_world directory, the ant build script
-can be used to create the war file that is deployed into the
-servlet container.
-
-Build the war file with the command:
-
- ant war
-
-Preparing deploy to APACHE TOMCAT
-
-* set CATALINA_HOME environment to your TOMCAT home directory
-
-Deploy the application into APACHE TOMCAT with the commond:
-[NOTE] This step will check if the cxf jars present in Tomcat,
- if not, it will automatically copy all the jars into
CATALINA_HOME/shared/lib
-
- ant deploy -Dtomcat=true
-
-The servlet container will extract the war and deploy the application.
-
+Please refer to samples directory README for building demo in a servlet
container.
Using ant, run the client application with the command:
@@ -179,9 +160,6 @@
Where # is the TCP/IP port used by the servlet container,
e.g., 8080.
-Undeploy the application from the APACHE TOMCAT with the command:
-
- ant undeploy -Dtomcat=true
Running demo with HTTP GET
Modified:
incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_RPCLit/README.txt
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_RPCLit/README.txt?view=diff&rev=566975&r1=566974&r2=566975
==============================================================================
---
incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_RPCLit/README.txt
(original)
+++
incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_RPCLit/README.txt
Fri Aug 17 02:03:02 2007
@@ -107,26 +107,7 @@
Building and running the demo in a servlet container
----------------------------------------------------
-From the samples/hello_world_RPCLit directory, the ant build script
-can be used to create the war file that is deployed into the
-servlet container.
-
-Build the war file with the command:
-
- ant war
-
-Preparing deploy to APACHE TOMCAT
-
-* set CATALINA_HOME environment to your TOMCAT home directory
-
-Deploy the application into APACHE TOMCAT with the commond:
-[NOTE] This step will check if the cxf jars present in Tomcat,
- if not, it will automatically copy all the jars into
CATALINA_HOME/shared/lib
-
- ant deploy -Dtomcat=true
-
-The servlet container will extract the war and deploy the application.
-
+Please refer to samples directory README for building demo in a servlet
container.
Using ant, run the client application with the command:
Modified:
incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_code_first/README.txt
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_code_first/README.txt?view=diff&rev=566975&r1=566974&r2=566975
==============================================================================
---
incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_code_first/README.txt
(original)
+++
incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_code_first/README.txt
Fri Aug 17 02:03:02 2007
@@ -107,26 +107,7 @@
Building and running the demo in a servlet container
----------------------------------------------------
-From the samples/hello_world directory, the ant build script
-can be used to create the war file that is deployed into the
-servlet container.
-
-Build the war file with the command:
-
- ant war
-
-Preparing deploy to APACHE TOMCAT
-
-* set CATALINA_HOME environment to your TOMCAT home directory
-
-Deploy the application into APACHE TOMCAT with the commond:
-[NOTE] This step will check if the cxf jars present in Tomcat,
- if not, it will automatically copy all the jars into
CATALINA_HOME/shared/lib
-
- ant deploy -Dtomcat=true
-
-The servlet container will extract the war and deploy the application.
-
+Please refer to samples directory README for building demo in a servlet
container.
Using ant, run the client application with the command:
Modified:
incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_xml_bare/README.txt
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_xml_bare/README.txt?view=diff&rev=566975&r1=566974&r2=566975
==============================================================================
---
incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_xml_bare/README.txt
(original)
+++
incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_xml_bare/README.txt
Fri Aug 17 02:03:02 2007
@@ -109,26 +109,7 @@
Building and running the demo in a servlet container
----------------------------------------------------
-From the samples/hello_world_xml_bare directory, the ant build script
-can be used to create the war file that is deployed into the
-servlet container.
-
-Build the war file with the command:
-
- ant war
-
-Preparing deploy to APACHE TOMCAT
-
-* set CATALINA_HOME environment to your TOMCAT home directory
-
-Deploy the application into APACHE TOMCAT with the commond:
-[NOTE] This step will check if the cxf jars present in Tomcat,
- if not, it will automatically copy all the jars into
CATALINA_HOME/shared/lib
-
- ant deploy -Dtomcat=true
-
-The servlet container will extract the war and deploy the application.
-
+Please refer to samples directory README for building demo in a servlet
container.
Using ant, run the client application with the command:
@@ -156,10 +137,6 @@
Where # is the TCP/IP port used by the servlet container,
e.g., 8080.
-
-Undeploy the application from the APACHE TOMCAT with the command:
-
- ant undeploy -Dtomcat=true
Running demo with HTTP GET
Modified:
incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_xml_wrapped/README.txt
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_xml_wrapped/README.txt?view=diff&rev=566975&r1=566974&r2=566975
==============================================================================
---
incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_xml_wrapped/README.txt
(original)
+++
incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_xml_wrapped/README.txt
Fri Aug 17 02:03:02 2007
@@ -109,26 +109,7 @@
Building and running the demo in a servlet container
----------------------------------------------------
-From the samples/hello_world_xml_wrapped directory, the ant build script
-can be used to create the war file that is deployed into the
-servlet container.
-
-Build the war file with the command:
-
- ant war
-
-Preparing deploy to APACHE TOMCAT
-
-* set CATALINA_HOME environment to your TOMCAT home directory
-
-Deploy the application into APACHE TOMCAT with the commond:
-[NOTE] This step will check if the cxf jars present in Tomcat,
- if not, it will automatically copy all the jars into
CATALINA_HOME/shared/lib
-
- ant deploy -Dtomcat=true
-
-The servlet container will extract the war and deploy the application.
-
+Please refer to samples directory README for building demo in a servlet
container.
Using ant, run the client application with the command:
@@ -154,10 +135,6 @@
Where # is the TCP/IP port used by the servlet container,
e.g., 8080.
-
-Undeploy the application from the APACHE TOMCAT with the command:
-
- ant undeploy -Dtomcat=true
Running demo with HTTP GET
Modified:
incubator/cxf/trunk/distribution/src/main/release/samples/java_first_pojo/README.txt
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/java_first_pojo/README.txt?view=diff&rev=566975&r1=566974&r2=566975
==============================================================================
---
incubator/cxf/trunk/distribution/src/main/release/samples/java_first_pojo/README.txt
(original)
+++
incubator/cxf/trunk/distribution/src/main/release/samples/java_first_pojo/README.txt
Fri Aug 17 02:03:02 2007
@@ -108,26 +108,7 @@
Building and running the demo in a servlet container
----------------------------------------------------
-From the samples/java_first_pojo directory, the ant build script
-can be used to create the war file that is deployed into the
-servlet container.
-
-Build the war file with the command:
-
- ant war
-
-Preparing deploy to APACHE TOMCAT
-
-* set CATALINA_HOME environment to your TOMCAT home directory
-
-Deploy the application into APACHE TOMCAT with the commond:
-[NOTE] This step will check if the cxf jars present in Tomcat,
- if not, it will automatically copy all the jars into
CATALINA_HOME/shared/lib
-
- ant deploy -Dtomcat=true
-
-The servlet container will extract the war and deploy the application.
-
+Please refer to samples directory README for building demo in a servlet
container.
Using ant, run the client application with the command:
@@ -156,6 +137,3 @@
Where # is the TCP/IP port used by the servlet container,
e.g., 8080.
-Undeploy the application from the APACHE TOMCAT with the command:
-
- ant undeploy -Dtomcat=true
Modified:
incubator/cxf/trunk/distribution/src/main/release/samples/java_first_pojo/src/demo/hw/client/Client.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/java_first_pojo/src/demo/hw/client/Client.java?view=diff&rev=566975&r1=566974&r2=566975
==============================================================================
---
incubator/cxf/trunk/distribution/src/main/release/samples/java_first_pojo/src/demo/hw/client/Client.java
(original)
+++
incubator/cxf/trunk/distribution/src/main/release/samples/java_first_pojo/src/demo/hw/client/Client.java
Fri Aug 17 02:03:02 2007
@@ -31,7 +31,7 @@
public static void main(String args[]) throws Exception {
ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
factory.setServiceClass(HelloWorld.class);
- if (args != null && args.length > 0) {
+ if (args != null && args.length > 0 && !"".equals(args[0])) {
factory.setAddress(args[0]);
} else {
factory.setAddress("http://localhost:9000/Hello");
Modified:
incubator/cxf/trunk/distribution/src/main/release/samples/soap12/README.txt
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/soap12/README.txt?view=diff&rev=566975&r1=566974&r2=566975
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/soap12/README.txt
(original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/soap12/README.txt
Fri Aug 17 02:03:02 2007
@@ -108,26 +108,7 @@
Building and running the demo in a servlet container
----------------------------------------------------
-From the samples/hello_world directory, the ant build script
-can be used to create the war file that is deployed into the
-servlet container.
-
-Build the war file with the command:
-
- ant war
-
-Preparing deploy to APACHE TOMCAT
-
-* set CATALINA_HOME environment to your TOMCAT home directory
-
-Deploy the application into APACHE TOMCAT with the commond:
-[NOTE] This step will check if the cxf jars present in Tomcat,
- if not, it will automatically copy all the jars into
CATALINA_HOME/shared/lib
-
- ant deploy -Dtomcat=true
-
-The servlet container will extract the war and deploy the application.
-
+Please refer to samples directory README for building demo in a servlet
container.
Using ant, run the client application with the command:
@@ -156,9 +137,6 @@
Where # is the TCP/IP port used by the servlet container,
e.g., 8080.
-Undeploy the application from the APACHE TOMCAT with the command:
-
- ant undeploy -Dtomcat=true
Running demo with HTTP GET
Modified:
incubator/cxf/trunk/distribution/src/main/release/samples/soap_header/README.txt
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/soap_header/README.txt?view=diff&rev=566975&r1=566974&r2=566975
==============================================================================
---
incubator/cxf/trunk/distribution/src/main/release/samples/soap_header/README.txt
(original)
+++
incubator/cxf/trunk/distribution/src/main/release/samples/soap_header/README.txt
Fri Aug 17 02:03:02 2007
@@ -117,26 +117,7 @@
Building and running the demo in a servlet container
----------------------------------------------------
-From the samples/soap_header directory, the ant build script
-can be used to create the war file that is deployed into the
-servlet container.
-
-Build the war file with the command:
-
- ant war
-
-Preparing deploy to APACHE TOMCAT
-
-* set CATALINA_HOME environment to your TOMCAT home directory
-
-Deploy the war file into APACHE TOMCAT with the commond:
-[NOTE] This step will check if the cxf jars present in Tomcat,
- if not, it will automatically copy all the jars into
CATALINA_HOME/shared/lib
-
- ant deploy -Dtomcat=true
-
-The servlet container will extract the war and deploy the application.
-
+Please refer to samples directory README for building demo in a servlet
container.
Using ant, run the client application with the command:
@@ -165,6 +146,3 @@
Where # is the TCP/IP port used by the servlet container,
e.g., 8080.
-Undeploy the application from the APACHE TOMCAT with the command:
-
- ant undeploy -Dtomcat=true