cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r531391 - in /incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca: common/README.txt hello_world_soap_http/build.xml inbound/build.xml
Date Mon, 23 Apr 2007 09:19:36 GMT
Author: ningjiang
Date: Mon Apr 23 02:19:29 2007
New Revision: 531391

URL: http://svn.apache.org/viewvc?view=rev&rev=531391
Log:
CXF-570 fixed the samples build.xml

Modified:
    incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/common/README.txt
    incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/hello_world_soap_http/build.xml
    incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/inbound/build.xml

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/common/README.txt
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/common/README.txt?view=diff&rev=531391&r1=531390&r2=531391
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/common/README.txt
(original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/common/README.txt
Mon Apr 23 02:19:29 2007
@@ -1,4 +1,13 @@
 
 This directory does not contain an Apache CXF demo.  It contains code that
-is common to other jca demos and builds a jar that is incorporated
-into other jca demos. 
+is common to other jca samples . You need to build the code of these dirctory
+before to run the other jca samples. 
+
+NOTE
+Please set the CXF_HOME environment variable firt to run the build.
+
+Set CXF environment
+=====================
+ (Unix) % export CXF_HOME=<cxf-home>
+ (Windows) > set CXF_HOME=<cxf-home>
+

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/hello_world_soap_http/build.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/hello_world_soap_http/build.xml?view=diff&rev=531391&r1=531390&r2=531391
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/hello_world_soap_http/build.xml
(original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/hello_world_soap_http/build.xml
Mon Apr 23 02:19:29 2007
@@ -20,17 +20,27 @@
 
 <project name="HelloWorldSOAPHttpDemo" default="build" basedir=".">
 
-    <!-- overload some properties to customize this build -->
     <property environment="env"/>
+    <condition property="jboss.home" value="${env.JBOSS_HOME}">
+        <isset property="env.JBOSS_HOME"/>
+    </condition>
+
+    <fail message="this sample need to use jboss, please setup JBOSS_HOME in your environment"
unless="jboss.home"/>
+
+    <property environment="env"/>
+    <condition property="cxf.home" value="${env.CXF_HOME}">
+        <isset property="env.CXF_HOME"/>
+    </condition>
+
+    <fail message="this sample need to use CXF_HOME enviroment, please setup CXF_HOME
in your environment" unless="cxf.home"/>
+
     <property name="wsdl.dir" value="${basedir}/etc/wsdl"/>
     <property name="wsdl.location" value="${wsdl.dir}/hello_world.wsdl"/>
     <property name="war.name" value="helloworld.war"/>
     <property name="j2ee.resources.dir" location="${basedir}/../common/resources"/>
-    <property name="cxf.home" value="${env.CXF_HOME}"/>
-    <property name="jboss.home" value="${env.JBOSS_HOME}"/>
-    <property file="${cxf.home}/etc/version.properties"/>
-
-
+    
+    <import file="../../../common_build.xml"/>
+ 
     <path id="thirdParth.classpath">
         <pathelement location="${basedir}/../common/common.jar"/>
     </path>
@@ -38,21 +48,22 @@
     <path id="other.classpath">
         <pathelement location="${cxf.home}/lib/geronimo-servlet_2.5_spec-1.1-M1.jar"/>
         <pathelement location="${basedir}/../common/common.jar"/>
-        <pathelement location="${cxf.home}/lib/cxf-integration-jca-${cxf.version}.jar"/>
         <pathelement location="${jboss.home}/client/jboss-j2ee.jar"/>
+        <fileset dir="${cxf.home}/modules" >  
+             <include name="cxf-integration-jca-*.jar"/>
+        </fileset>
     </path>
-
-    <import file="${cxf.home}/samples/common_build.xml"/>
-
-
+    
     <target name="prepare">
         <replace file="${cxf.home}/etc/ra.xml" token="CXF_HOME" value="${cxf.home}"/>
     </target>
 
     <target name="init">
         <mkdir dir="${build.classes.dir}"/>
+        <mkdir dir="${build.classes.dir}/lib"/>
     </target>
 
+
     <target name="update.jboss.endorsed">
         <copy todir="${jboss.home}/lib/endorsed">
             <fileset dir="${cxf.home}/lib">
@@ -66,9 +77,9 @@
         </copy>
     </target>
 
-    <target name="deploy.cxf.rar" depends="generate.rar">
+    <target name="deploy.cxf.rar" depends="generate.rar" description="deploy the cxf.rar">
         <copy todir="${jboss.home}/server/default/deploy">
-            <fileset dir="${cxf.home}/lib" includes="cxf.rar"/>
+            <fileset dir="${build.classes.dir}/lib" includes="cxf.rar"/>
             <fileset dir="${basedir}/etc" includes="cxfj2ee_1_5-ds.xml"/>
         </copy>
     </target>
@@ -79,17 +90,21 @@
         <copy todir="${build.classes.dir}/cxf-rar">
             <fileset dir="${cxf.home}/lib">
                 <include name="*.jar"/>
+                <exclude name="*manifest*.jar"/>
+            </fileset>
+            <fileset dir="${cxf.home}/modules">
+                <include name="*.jar"/>
                 <exclude name="*-jbi-*.jar"/>
+                <exclude name="*manifest*.jar"/>
             </fileset>
         </copy>
-        <jar destfile="${cxf.home}/lib/cxf.rar"
+        <jar destfile="${build.classes.dir}/lib/cxf.rar"
          basedir="${build.classes.dir}/cxf-rar"/>
     </target>
 
 
 
-    <target name="compile-j2ee" depends="maybe.generate.code">
-        <!--target name="compile-j2ee"-->
+    <target name="j2ee.compile" depends="maybe.generate.code">
         <javac destdir="${build.classes.dir}" debug="true">
             <src path="${build.src.dir}"/>
             <src path="${basedir}/src"/>
@@ -105,8 +120,8 @@
             <fileset dir="${build.src.dir}" includes="**/*.wsdl" />
         </copy>
     </target>
-
-    <target name="build" depends="compile-j2ee,build-war"/>
+   
+    <target name="build" description="compile the code" depends="clean,init,j2ee.compile,build-war"/>
 
     <target name="generate.code">
         <echo level="info" message="Generating code using wsdl2java..."/>
@@ -151,7 +166,7 @@
         </war>
     </target>
 
-    <target name="deploy.war" depends="build-war">
+    <target name="deploy.war" description="deploy the helloworld.war" depends="build-war">
         <copy todir="${jboss.home}/server/default/deploy">
             <fileset dir="${basedir}/build/lib" includes="helloworld.war"/>
         </copy>
@@ -162,11 +177,5 @@
         <cxfrun classname="demo.client.Client" param1="${op}"/>
     </target>
 
-    <target name="clean">
-        <delete failonerror="no">
-            <fileset dir="./src" includes="**/*.class"/>
-            <fileset dir="." includes="**/*.war"/>
-        </delete>
-    </target>
 
 </project>

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/inbound/build.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/inbound/build.xml?view=diff&rev=531391&r1=531390&r2=531391
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/inbound/build.xml
(original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/integration/jca/inbound/build.xml
Mon Apr 23 02:19:29 2007
@@ -1,5 +1,4 @@
 <?xml version="1.0"?>
-
 <!--
   Licensed to the Apache Software Foundation (ASF) under one
   or more contributor license agreements. See the NOTICE file
@@ -19,160 +18,164 @@
   under the License.
 -->
 
-<project name="Inbound Connection Demo" default="build" basedir=".">
+<project name="HelloWorldSOAPHttpDemo" default="build" basedir=".">
 
-  <property environment="env"/>
-  <property name="demos.current.dir" value="."/>
-  <property name="build.classes.dir" value="${basedir}/build"/>
-  <property name="cxf.home" value="${env.CXF_HOME}"/>
-  <property name="wsdl.dir" value="${basedir}/wsdl"/>
-  <property name="wsdl.location" value="${basedir}/wsdl/hello_world.wsdl"/>
-  <property name="build.archives" value="${basedir}/j2ee-archives"/> 
-  <property name="ejb.xml" location="./etc/ejb.xml"/>
+    <property environment="env"/>
+    <condition property="jboss.home" value="${env.JBOSS_HOME}">
+        <isset property="env.JBOSS_HOME"/>
+    </condition>
+
+    <fail message="this sample need to use jboss, please setup JBOSS_HOME in your environment"
unless="jboss.home"/>
+
+    <property environment="env"/>
+    <condition property="cxf.home" value="${env.CXF_HOME}">
+        <isset property="env.CXF_HOME"/>
+    </condition>
+
+    <fail message="this sample need to use CXF_HOME enviroment, please setup CXF_HOME
in your environment" unless="cxf.home"/>
+
+    <property name="wsdl.dir" value="${basedir}/etc/wsdl"/>
+    <property name="wsdl.location" value="${wsdl.dir}/hello_world.wsdl"/>
+    <property name="war.name" value="helloworld.war"/>
+    <property name="j2ee.resources.dir" location="${basedir}/../common/resources"/>
     
-  <property name="j2ee.resources.dir" location="${basedir}/../common/resources"/>
-  <property name="servants.props.file" location="${cxf.home}/etc/ejb_servants.properties"/>
-  <property file="${servants.props.file}"/>
-  <property name="j2ee.archives" value="j2ee-archives"/>
-
-  <property name="jboss.home" value="${env.JBOSS_HOME}"/>
-  <property file="${cxf.home}/etc/version.properties"/>
-
+    <import file="../../../common_build.xml"/>
  
-  <path id="other.classpath">
-    <pathelement location="${cxf.home}/lib/cxf-integration-jca-${cxf.version}.jar"/>
-    <pathelement location="${jboss.home}/client/jbossall-client.jar"/>
-  </path>
-
-  <target name="prepare">
-    <replace file="${cxf.home}/etc/ra.xml" token="CXF_HOME" value="${cxf.home}"/>
-  </target>
-
-  <target name="init"> 
-    <!--mkdir dir="${build.classes.dir}"/-->
-    <mkdir dir="${build.classes.dir}/cxf-rar/META-INF"/>
-    
-    <mkdir dir="${j2ee.archives}"/>
-  </target>
-  
-  <target name="update.jboss.endorsed">
-    <copy todir="${jboss.home}/lib/endorsed">
-      <fileset dir="${cxf.home}/lib">
-	<include name="activation*" />            
-	<include name="jaxb*" />
-	<include name="stax*" />
-	<include name="jsr181*" />
-	<include name="saaj*" />
-      </fileset>
-    </copy>
-  </target>
-
-  <target name="deploy.cxf.rar" depends="generate.rar">
-    <copy todir="${jboss.home}/server/default/deploy">
-      <fileset dir="${cxf.home}/lib" includes="cxf.rar"/>
-      <fileset dir="${basedir}/etc" includes="cxfj2ee_1_5-ds.xml"/>
-    </copy>
-  </target>
-
-  <target name="generate.rar" depends="prepare,update.jboss.endorsed,init">
-    <copy file="${cxf.home}/etc/ra.xml" todir="${build.classes.dir}/cxf-rar/META-INF"/>
-    <copy todir="${build.classes.dir}/cxf-rar">
-      <fileset dir="${cxf.home}/lib">
-	<include name="activation*.jar"/>
-	<include name="aopalliance*.jar"/>
-	<include name="cxf-api*.jar"/>
-	<include name="commons*.jar"/>
-	<include name="cxf-common*.jar"/>
-	<include name="cxf-integration-jca*.jar"/>
-	<include name="cxf-metacode*.jar"/>
-	<include name="cxf-rt*.jar"/>
-	<include name="cxf-tools-common*.jar"/>
-	<include name="jaxb*.jar"/>
-	<include name="jaxws*.jar"/>
-	<include name="jsr*.jar"/>
-	<include name="mail*.jar"/>
-	<include name="org.mortbay.jetty*.jar"/>
-	<include name="saaj*.jar"/>
-	<include name="servlet*.jar"/>
-	<include name="spring*.jar"/>
-	<include name="stax*.jar"/>
-	<include name="velocity*.jar"/>
-	<include name="wsdl4j*.jar"/>
-	<include name="wstx*.jar"/>
-	<include name="XmlSchema*.jar"/>
-      </fileset>
-    </copy>
-    <jar destfile="${cxf.home}/lib/cxf.rar"
-	 basedir="${build.classes.dir}/cxf-rar"/>
-  </target>
+    <path id="thirdParth.classpath">
+        <pathelement location="${basedir}/../common/common.jar"/>
+    </path>
+
+    <path id="other.classpath">
+        <pathelement location="${cxf.home}/lib/geronimo-servlet_2.5_spec-1.1-M1.jar"/>
+        <pathelement location="${basedir}/../common/common.jar"/>
+        <pathelement location="${jboss.home}/client/jboss-j2ee.jar"/>
+        <fileset dir="${cxf.home}/modules" >  
+             <include name="cxf-integration-jca-*.jar"/>
+        </fileset>
+    </path>
     
+    <target name="prepare">
+        <replace file="${cxf.home}/etc/ra.xml" token="CXF_HOME" value="${cxf.home}"/>
+    </target>
 
-  <target name="build" depends="clean,init,j2ee.compile,build.ejb.jar"/> 
+    <target name="init">
+        <mkdir dir="${build.classes.dir}"/>
+        <mkdir dir="${build.classes.dir}/lib"/>
+    </target>
 
-    
-  <target name="j2ee.compile">
-    <javac srcdir="${basedir}/src" destdir="${build.classes.dir}" libtrue" fork="yes">
-      <include name="**/*.java"/>
-      <classpath>
-	<pathelement location="${cxf.home}/modules/cxf-manifest-incubator.jar"/>
-	<pathelement location="${build.classes.dir}"/>
-	<!--path refid="cxf.classpath"/-->
-	<path refid="other.classpath"/>
-      </classpath>
-    </javac>
-  </target>
-
-  <target name="clean">
-    <delete failonerror="no">
-      <fileset dir="./src" includes="**/*.class"/>
-      <fileset dir="." includes="**/*.jar"/>
-      <fileset dir="." includes="**/*.rar"/>
-      <fileset dir="${build.classes.dir}/cxf-rar" includes="**/*"/>
-    </delete>
-  </target>
-    
-  <target name="build.ejb.jar"> 
-    <jar destfile="${j2ee.archives}/greeterejb.jar"> 
-      <metainf dir="./etc"> 
-	<include name="*ejb*.xml"/>
-      </metainf>
-      <fileset dir="${build.classes.dir}/" includes="org/**/*.class"/>
-      <fileset dir="${build.classes.dir}">
-	<include name="**/ejb/*.class"/>
-      </fileset>
-    </jar>
-  </target> 
-
-  <target name="deploy.ejb.jar" depends="build.ejb.jar">
-    <copy todir="${jboss.home}/server/default/deploy">
-      <fileset dir="${j2ee.archives}" includes="greeterejb.jar"/>
-    </copy>
-  </target>
-
-    <!-- 
-	 this target appends the necessary entry to ejb_servants.properties 
-	 to activate the web services facade for the greeterejb.jar application.
-    -->
-    <target name="activate" description="updates ejb_servants.properties for demo " unless="GreeterBean">
-      <property name="servant.definition" 
-		value="GreeterBean={http://apache.org/hello_world_soap_http}Greeter@file:"/>
-      <echo message="updating ${servants.props.file}" />
-
-      <echo file="${servants.props.file}" append="true">
-	# entry for the j2ee inbound demo
-	${servant.definition}
-      </echo>
-      <replace file="${servants.props.file}" token="\" value="/"/> 
+
+    <target name="update.jboss.endorsed">
+        <copy todir="${jboss.home}/lib/endorsed">
+            <fileset dir="${cxf.home}/lib">
+                <include name="*activation*" />
+                <include name="jaxb*" />
+                <include name="stax*" />
+                <include name="jsr181*" />
+                <include name="saaj*" />
+                <include name="wsdl4j*" />
+            </fileset>
+        </copy>
+    </target>
+
+    <target name="deploy.cxf.rar" depends="generate.rar" description="deploy the cxf.rar">
+        <copy todir="${jboss.home}/server/default/deploy">
+            <fileset dir="${build.classes.dir}/lib" includes="cxf.rar"/>
+            <fileset dir="${basedir}/etc" includes="cxfj2ee_1_5-ds.xml"/>
+        </copy>
+    </target>
+
+
+    <target name="generate.rar" depends="prepare,update.jboss.endorsed,init">
+        <copy file="${cxf.home}/etc/ra.xml" todir="${build.classes.dir}/cxf-rar/META-INF"/>
+        <copy todir="${build.classes.dir}/cxf-rar">
+            <fileset dir="${cxf.home}/lib">
+                <include name="*.jar"/>
+                <exclude name="*manifest*.jar"/>
+            </fileset>
+            <fileset dir="${cxf.home}/modules">
+                <include name="*.jar"/>
+                <exclude name="*-jbi-*.jar"/>
+                <exclude name="*manifest*.jar"/>
+            </fileset>
+        </copy>
+        <jar destfile="${build.classes.dir}/lib/cxf.rar"
+         basedir="${build.classes.dir}/cxf-rar"/>
+    </target>
+
+
+
+    <target name="j2ee.compile" depends="maybe.generate.code">
+        <javac destdir="${build.classes.dir}" debug="true">
+            <src path="${build.src.dir}"/>
+            <src path="${basedir}/src"/>
+            <classpath>
+                <path refid="cxf.classpath"/>
+                <path refid="other.classpath"/>
+            </classpath>
+        </javac>
+
+        <copy todir="${build.classes.dir}">
+            <fileset dir="${basedir}/src" includes="**/*.xml" />
+            <fileset dir="${build.src.dir}" includes="**/*.xml" />
+            <fileset dir="${build.src.dir}" includes="**/*.wsdl" />
+        </copy>
+    </target>
+   
+    <target name="build" description="compile the code" depends="clean,init,j2ee.compile,build-war"/>
+
+    <target name="generate.code">
+        <echo level="info" message="Generating code using wsdl2java..."/>
+        <wsdl2java file="hello_world.wsdl"/>
+    </target>
+
+    <!--target name="server" description="run demo server" depends="build">
+      <property name="param" value=""/>
+      <cxfrun classname="demo.hw.server.Server"
+                 param1="${wsdl.dir}/hello_world.wsdl"/>
+    </target-->
+
+    <target name="build-war">
+        <copy file="${wsdl.location}" todir="${basedir}/src" />
+
+        <mkdir dir="./build/lib"/>
+        <mkdir dir="./build/classes/wsdl"/>
+        <copy file="${wsdl.location}" todir="${basedir}/build/classes/wsdl"/>
+        <war destfile="build/lib/${war.name}" webxml="${basedir}/etc/web.xml">
+            <webinf dir="etc">
+                <include name="jboss-web.xml"/>
+                <include name="weblogic.xml"/>
+            </webinf>
+
+            <lib dir="../common/">
+                <include name="common.jar"/>
+            </lib>
+
+            <classes dir="${build.classes.dir}">
+                <include name="**/*.class"/>
+                <include name="**/*.wsdl"/>
+            </classes>
+
+            <zipfileset dir="${j2ee.resources.dir}/images" prefix="images">
+                <include name="*.gif" />
+            </zipfileset>
+
+            <zipfileset dir="${j2ee.resources.dir}">
+                <include name="*.css" />
+            </zipfileset>
+
+        </war>
+    </target>
+
+    <target name="deploy.war" description="deploy the helloworld.war" depends="build-war">
+        <copy todir="${jboss.home}/server/default/deploy">
+            <fileset dir="${basedir}/build/lib" includes="helloworld.war"/>
+        </copy>
+    </target>
+
+    <target name="client" description="run demo client" depends="build">
+        <property name="param" value=""/>
+        <cxfrun classname="demo.client.Client" param1="${op}"/>
     </target>
 
 
-    <target name="client"> 
-      <java classname="demolib.GreeterClient" fork="true"> 
-	<arg value="${wsdl.location}"/> 
-	<classpath> 
-	  <pathelement location="${build.classes.dir}"/>
-	  <pathelement path="${cxf.home}/modules/cxf-manifest-incubator.jar"/>
-	</classpath>
-      </java> 
-    </target> 
 </project>



Mime
View raw message