You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by mm...@apache.org on 2006/11/30 03:40:42 UTC

svn commit: r480810 - in /incubator/cxf/trunk/distribution/src/main/release/samples: ./ dispatch_provider/ hello_world/ hello_world_RPCLit/ hello_world_xml_bare/ hello_world_xml_wrapped/ soap12/ soap_header/

Author: mmao
Date: Wed Nov 29 18:40:40 2006
New Revision: 480810

URL: http://svn.apache.org/viewvc?view=rev&rev=480810
Log:
CXF-276
Add deploy/undeploy targets in sample ant build file

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/dispatch_provider/build.xml
    incubator/cxf/trunk/distribution/src/main/release/samples/hello_world/README.txt
    incubator/cxf/trunk/distribution/src/main/release/samples/hello_world/build.xml
    incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_RPCLit/README.txt
    incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_RPCLit/build.xml
    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_bare/build.xml
    incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_xml_wrapped/README.txt
    incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_xml_wrapped/build.xml
    incubator/cxf/trunk/distribution/src/main/release/samples/soap12/README.txt
    incubator/cxf/trunk/distribution/src/main/release/samples/soap12/build.xml
    incubator/cxf/trunk/distribution/src/main/release/samples/soap_header/README.txt
    incubator/cxf/trunk/distribution/src/main/release/samples/soap_header/build.xml

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=480810&r1=480809&r2=480810
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/README.txt (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/README.txt Wed Nov 29 18:40:40 2006
@@ -63,5 +63,16 @@
 the JAVA_HOME environment variable points to the JDK/JRE 5.0 installation
 and the JAVA_HOME bin directory is included in the system PATH.
 
-Make sure you have copied all jars (except cxf-integration-* jars) from 
-CXF_HOME/lib to <TomcatInstallationDirectory>/shared/lib.
+Preparing deploy to APACHE TOMCAT
+
+* set CATALINA_HOME environment to your TOMCAT home directory
+* Copied all jars (EXCEPT cxf-integration-jbi* jars)  from 
+  CXF_HOME/lib to <CATALINA_HOME>/shared/lib
+    
+Deploy the application into APACHE TOMCAT with the commond:
+  
+  ant deploy -Dtomcat=true
+
+Undeploy the application from the APACHE TOMCAT with the command:
+
+   ant undeploy -Dtomcat=true
\ No newline at end of file

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=480810&r1=480809&r2=480810
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/common_build.xml (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/common_build.xml Wed Nov 29 18:40:40 2006
@@ -223,4 +223,36 @@
         </sequential>
     </macrodef>
 
+    <target name="deploy" depends="deploy-tomcat"/>
+    <target name="undeploy" depends="undeploy-tomcat"/>
+    
+    <target name="deploy-tomcat" if="tomcat">
+	<antcall target="validate-tomcat"/>
+	<copy file="${war.dir}/${cxf.war.file.name}.war"
+	      todir="${env.CATALINA_HOME}/webapps"/>
+    </target>
+
+    <target name="undeploy-tomcat" if="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}"/>
+    </target>
+
+    <target name="validate-tomcat">
+	<fail unless="env.CATALINA_HOME" message="You should set the CATALINA_HOME, if you want to deploy into tomcat"/>
+	
+	<available property="cxf.jars.present.in.tomcat" file="${env.CATALINA_HOME}/shared/lib/cxf-incubator.jar" type="file"/>
+	<fail unless="cxf.jars.present.in.tomcat" message="In order to run CXF service under TOMCAT, 
+							   you MUST copy jars under ${cxf.home}/lib/ into ${env.CATALINA_HOME}/shared/lib/ first"/>
+	
+	<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 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/dispatch_provider/build.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/dispatch_provider/build.xml?view=diff&rev=480810&r1=480809&r2=480810
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/dispatch_provider/build.xml (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/dispatch_provider/build.xml Wed Nov 29 18:40:40 2006
@@ -27,7 +27,7 @@
     </target> 
         
     <target name="server" description="run demo server" depends="build">
-        <cxfrun classname="demo.hwDispatch.server.Server" param1="${basedir}/wsdl/hello_world.wsdl"/>
+        <cxfrun classname="demo.hwDispatch.server.Server"/>
     </target>
         
     <target name="generate.code">

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=480810&r1=480809&r2=480810
==============================================================================
--- 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 Wed Nov 29 18:40:40 2006
@@ -117,16 +117,17 @@
 
   ant war
     
+Preparing deploy to APACHE TOMCAT
 
-The war file will be included in the directory
-samples/hello_world/build/war.  Simply copy the war file into
-the servlet container's deployment directory.  For example,
-with Tomcat copy the war file into the directory
-<installationDirectory>/webapps.  The servlet container will
-extract the war and deploy the application.
+* set CATALINA_HOME environment to your TOMCAT home directory
+* Copied all jars (EXCEPT cxf-integration-jbi* jars)  from 
+  CXF_HOME/lib to <CATALINA_HOME>/shared/lib
+    
+Deploy the application into APACHE TOMCAT with the commond:
+  
+  ant deploy -Dtomcat=true
 
-Make sure you have already copied all jars (except cxf-integration-* jars)
-from CXF_HOME/lib to <TomcatInstallationDirectory>/shared/lib
+The servlet container will extract the war and deploy the application.
 
 
 Using ant, run the client application with the command:
@@ -150,3 +151,7 @@
 
 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
\ No newline at end of file

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/hello_world/build.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/hello_world/build.xml?view=diff&rev=480810&r1=480809&r2=480810
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/hello_world/build.xml (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/hello_world/build.xml Wed Nov 29 18:40:40 2006
@@ -38,10 +38,11 @@
         <echo level="info" message="Generating code using wsdl2java..."/>
         <wsdl2java file="hello_world.wsdl"/>
     </target>
-    
+
+    <property name="cxf.war.file.name" value="helloworld"/>
     <target name="war" depends="build">
-        <cxfwar wsdl="hello_world.wsdl" filename="helloworld.war"/>
-	</target>
+	<cxfwar wsdl="hello_world.wsdl" filename="${cxf.war.file.name}.war"/>
+    </target>
 
     <target name="client-servlet" description="run demo client hitting servlet" depends="build">
         <property name="param" value=""/>

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=480810&r1=480809&r2=480810
==============================================================================
--- 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 Wed Nov 29 18:40:40 2006
@@ -120,16 +120,18 @@
 
   ant war
     
+Preparing deploy to APACHE TOMCAT
 
-The war file will be included in the directory
-samples/hello_world_RPCLit/build/war.  Simply copy the war file into
-the servlet container's deployment directory.   For example,
-with Tomcat copy the war file into the directory
-<installationDirectory>/webapps.  The servlet container will
-extract the war and deploy the application.
+* set CATALINA_HOME environment to your TOMCAT home directory
+* Copied all jars (EXCEPT cxf-integration-jbi* jars)  from 
+  CXF_HOME/lib to <CATALINA_HOME>/shared/lib
+    
+Deploy the application into APACHE TOMCAT with the commond:
+  
+  ant deploy -Dtomcat=true
+
+The servlet container will extract the war and deploy the application.
 
-Make sure you have already copied all jars (except cxf-integration-* jars)
-from CXF_HOME/lib to <TomcatInstallationDirectory>/shared/lib
 
 Using ant, run the client application with the command:
 
@@ -152,3 +154,7 @@
 
 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
\ No newline at end of file

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_RPCLit/build.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_RPCLit/build.xml?view=diff&rev=480810&r1=480809&r2=480810
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_RPCLit/build.xml (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_RPCLit/build.xml Wed Nov 29 18:40:40 2006
@@ -38,9 +38,10 @@
         <echo level="info" message="Generating code using wsdl2java..."/>
         <wsdl2java file="hello_world_RPCLit.wsdl"/>
     </target>
-    
+
+    <property name="cxf.war.file.name" value="helloworld"/>
     <target name="war" depends="build">
-        <cxfwar wsdl="hello_world_RPCLit.wsdl" filename="helloworld.war"/>
+        <cxfwar wsdl="hello_world_RPCLit.wsdl" filename="${cxf.war.file.name}.war"/>
 	</target>
 
     <target name="client-servlet" description="run demo client hitting servlet" depends="build">

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=480810&r1=480809&r2=480810
==============================================================================
--- 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 Wed Nov 29 18:40:40 2006
@@ -120,16 +120,18 @@
 
   ant war
     
+Preparing deploy to APACHE TOMCAT
 
-The war file will be included in the directory
-samples/hello_world_xml_bare/build/war.  Simply copy the war file into
-the servlet container's deployment directory.  For example,
-with Tomcat copy the war file into the directory
-<installationDirectory>/webapps.  The servlet container will
-extract the war and deploy the application.
+* set CATALINA_HOME environment to your TOMCAT home directory
+* Copied all jars (EXCEPT cxf-integration-jbi* jars)  from 
+  CXF_HOME/lib to <CATALINA_HOME>/shared/lib
+    
+Deploy the application into APACHE TOMCAT with the commond:
+  
+  ant deploy -Dtomcat=true
+
+The servlet container will extract the war and deploy the application.
 
-Make sure you have already copied all jars (except cxf-integration-* jars)
-from CXF_HOME/lib to <TomcatInstallationDirectory>/shared/lib
 
 Using ant, run the client application with the command:
 
@@ -152,3 +154,7 @@
 
 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
\ No newline at end of file

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_xml_bare/build.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_xml_bare/build.xml?view=diff&rev=480810&r1=480809&r2=480810
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_xml_bare/build.xml (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_xml_bare/build.xml Wed Nov 29 18:40:40 2006
@@ -38,9 +38,10 @@
         <echo level="info" message="Generating code using wsdl2java..."/>
         <wsdl2java file="hello_world.wsdl"/>
     </target>
-    
+
+    <property name="cxf.war.file.name" value="helloworld"/>
     <target name="war" depends="build">
-        <cxfwar wsdl="hello_world.wsdl" filename="helloworld.war"/>
+        <cxfwar wsdl="hello_world.wsdl" filename="${cxf.war.file.name}.war"/>
 	</target>
 
     <target name="client-servlet" description="run demo client hitting servlet" depends="build">

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=480810&r1=480809&r2=480810
==============================================================================
--- 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 Wed Nov 29 18:40:40 2006
@@ -120,16 +120,18 @@
 
   ant war
     
+Preparing deploy to APACHE TOMCAT
 
-The war file will be included in the directory
-samples/hello_world_xml_wrapped/build/war.  Simply copy the war file into
-the servlet container's deployment directory.  For example,
-with Tomcat copy the war file into the directory
-<installationDirectory>/webapps.  The servlet container will
-extract the war and deploy the application.
+* set CATALINA_HOME environment to your TOMCAT home directory
+* Copied all jars (EXCEPT cxf-integration-jbi* jars)  from 
+  CXF_HOME/lib to <CATALINA_HOME>/shared/lib
+    
+Deploy the application into APACHE TOMCAT with the commond:
+  
+  ant deploy -Dtomcat=true
+
+The servlet container will extract the war and deploy the application.
 
-Make sure you have already copied all jars (except cxf-integration-* jars)
-from CXF_HOME/lib to <TomcatInstallationDirectory>/shared/lib
 
 Using ant, run the client application with the command:
 
@@ -152,3 +154,7 @@
 
 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
\ No newline at end of file

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_xml_wrapped/build.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_xml_wrapped/build.xml?view=diff&rev=480810&r1=480809&r2=480810
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_xml_wrapped/build.xml (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_xml_wrapped/build.xml Wed Nov 29 18:40:40 2006
@@ -38,9 +38,10 @@
         <echo level="info" message="Generating code using wsdl2java..."/>
         <wsdl2java file="hello_world.wsdl"/>
     </target>
-    
+
+    <property name="cxf.war.file.name" value="helloworld"/>
     <target name="war" depends="build">
-        <cxfwar wsdl="hello_world.wsdl" filename="helloworld.war"/>
+        <cxfwar wsdl="hello_world.wsdl" filename="${cxf.war.file.name}.war"/>
 	</target>
 
     <target name="client-servlet" description="run demo client hitting servlet" depends="build">

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=480810&r1=480809&r2=480810
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/soap12/README.txt (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/soap12/README.txt Wed Nov 29 18:40:40 2006
@@ -119,16 +119,18 @@
 
   ant war
     
+Preparing deploy to APACHE TOMCAT
 
-The war file will be included in the directory
-samples/hello_world/build/war.  Simply copy the war file into
-the servlet container's deployment directory.  For example,
-with Tomcat copy the war file into the directory
-<installationDirectory>/webapps.  The servlet container will
-extract the war and deploy the application.
+* set CATALINA_HOME environment to your TOMCAT home directory
+* Copied all jars (EXCEPT cxf-integration-jbi* jars)  from 
+  CXF_HOME/lib to <CATALINA_HOME>/shared/lib
+    
+Deploy the application into APACHE TOMCAT with the commond:
+  
+  ant deploy -Dtomcat=true
+
+The servlet container will extract the war and deploy the application.
 
-Make sure you have already copied all jars (except cxf-integration-* jars)
-from CXF_HOME/lib to <TomcatInstallationDirectory>/shared/lib
 
 Using ant, run the client application with the command:
 
@@ -151,3 +153,7 @@
 
 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/soap12/build.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/soap12/build.xml?view=diff&rev=480810&r1=480809&r2=480810
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/soap12/build.xml (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/soap12/build.xml Wed Nov 29 18:40:40 2006
@@ -46,9 +46,10 @@
         <echo level="info" message="Generating code using wsdl2java..."/>
         <wsdl2java file="hello_world_soap12.wsdl"/>
     </target>
-    
+
+    <property name="cxf.war.file.name" value="helloworld"/>
     <target name="war" depends="build">
-        <cxfwar wsdl="hello_world_soap12.wsdl" filename="helloworld.war"/>
+        <cxfwar wsdl="hello_world_soap12.wsdl" filename="${cxf.war.file.name}.war"/>
 	</target>
 
     <target name="client-servlet" description="run demo client hitting servlet" depends="build">

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=480810&r1=480809&r2=480810
==============================================================================
--- 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 Wed Nov 29 18:40:40 2006
@@ -126,17 +126,18 @@
 Build the war file with the command:
 
   ant war
-    
 
-The war file will be included in the directory
-samples/soap_header/build/war.  Simply copy the war file into
-the servlet container's deployment directory.  For example,
-with Tomcat copy the war file into the directory
-<installationDirectory>/webapps.  The servlet container will
-extract the war and deploy the application.
+Preparing deploy to APACHE TOMCAT
+
+* set CATALINA_HOME environment to your TOMCAT home directory
+* Copied all jars (EXCEPT cxf-integration-jbi* jars)  from 
+  CXF_HOME/lib to <CATALINA_HOME>/shared/lib
+    
+Deploy the war file into APACHE TOMCAT with the commond:
+  
+  ant deploy -Dtomcat=true
 
-Make sure you have already copied all jars (except cxf-integration-* jars)
-from CXF_HOME/lib to <TomcatInstallationDirectory>/shared/lib
+The servlet container will extract the war and deploy the application.
 
 
 Using ant, run the client application with the command:
@@ -160,3 +161,7 @@
 
 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/soap_header/build.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/soap_header/build.xml?view=diff&rev=480810&r1=480809&r2=480810
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/soap_header/build.xml (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/soap_header/build.xml Wed Nov 29 18:40:40 2006
@@ -36,8 +36,9 @@
         <wsdl2java file="soap_header.wsdl"/>
     </target>
 
+    <property name="cxf.war.file.name" value="soapheader"/>
     <target name="war" depends="build">
-        <cxfwar wsdl="soap_header.wsdl" filename="soapheader.war"/>
+        <cxfwar wsdl="soap_header.wsdl" filename="${cxf.war.file.name}.war"/>
 	</target>
 
     <target name="client-servlet" description="run demo client hitting servlet" depends="build">