Author: wsmoak Date: Thu Mar 16 21:04:14 2006 New Revision: 386541 URL: http://svn.apache.org/viewcvs?rev=386541&view=rev Log: Added Cargo integration to the Use Cases example. To use Cargo to run the integration tests, you will need to: * execute 'ant download-dependencies' to retrieve the Cargo jars * set the new properties 'tomcat55.home' and 'tomcat50.home' in build.properties * execute 'ant systest-tomcat55' and 'ant systest-tomcat50'
Modified: struts/shale/trunk/build.properties.sample struts/shale/trunk/build.xml struts/shale/trunk/use-cases/build.xml Modified: struts/shale/trunk/build.properties.sample URL: http://svn.apache.org/viewcvs/struts/shale/trunk/build.properties.sample?rev=386541&r1=386540&r2=386541&view=diff ============================================================================== --- struts/shale/trunk/build.properties.sample (original) +++ struts/shale/trunk/build.properties.sample Thu Mar 16 21:04:14 2006 @@ -73,4 +73,8 @@ # an installed copy of Sun Java Studio Creator 2 creator2.home=${user.home}/sun/Creator2 +# (Optional) The path to a Tomcat 5.5.x installation +tomcat55.home=c:/java/apache-tomcat-5.5.15 +# (Optional) The path to a Tomcat 5.0.x installation +tomcat50.home=c:/java/jakarta-tomcat-5.0.28 Modified: struts/shale/trunk/build.xml URL: http://svn.apache.org/viewcvs/struts/shale/trunk/build.xml?rev=386541&r1=386540&r2=386541&view=diff ============================================================================== --- struts/shale/trunk/build.xml (original) +++ struts/shale/trunk/build.xml Thu Mar 16 21:04:14 2006 @@ -602,6 +602,14 @@ ignoreerrors="true" src="http://cvs.apache.org/repository/tiles/jars/tiles-core-SNAPSHOT.jar"/> + <mkdir dir="${lib.dir}/cargo"/> + <get dest="${lib.dir}/cargo/cargo-ant-0.7.jar" + ignoreerrors="true" + src="${maven.repo}/cargo/jars/cargo-ant-0.7.jar"/> + <get dest="${lib.dir}/cargo/cargo-core-uberjar-0.7.jar" + ignoreerrors="true" + src="${maven.repo}/cargo/jars/cargo-core-uberjar-0.7.jar"/> + </target> Modified: struts/shale/trunk/use-cases/build.xml URL: http://svn.apache.org/viewcvs/struts/shale/trunk/use-cases/build.xml?rev=386541&r1=386540&r2=386541&view=diff ============================================================================== --- struts/shale/trunk/use-cases/build.xml (original) +++ struts/shale/trunk/use-cases/build.xml Thu Mar 16 21:04:14 2006 @@ -535,6 +535,77 @@ </junit> </target> + + <!-- ====================== Cargo Integration ====================== --> + <!-- Cargo properties --> + <property name="cargolib.dir" value="${lib.dir}/cargo"/> + <property name="cargo-uberjar" value="${cargolib.dir}/cargo-core-uberjar-0.7.jar"/> + <property name="cargo-antjar" value="${cargolib.dir}/cargo-ant-0.7.jar"/> + + <taskdef resource="cargo.tasks"> + <classpath> + <pathelement location="${cargo-uberjar}"/> + <pathelement location="${cargo-antjar}"/> + </classpath> + </taskdef> + + <!-- Tomcat properties --> + <property name="tomcatlog.dir" value="${build.home}/logs" /> + <property name="tomcatconfig.dir" value="${build.home}/tomcat" /> + <property name="warfile" value="${build.home}/${context.path}.war" /> + + <target name="copywar" depends=""> + <copy tofile="${warfile}" + file="dist/${context.path}-${project.version}.war"/> + </target> + + <target name="start-tomcat55" depends=""> + <delete dir="${tomcatconfig.dir}" /> + <mkdir dir="${tomcatlog.dir}"/> + <mkdir dir="${tomcatconfig.dir}"/> + <echo message="Starting Cargo..."/> + <echo message="Using tomcat.home = ${tomcat55.home} "/> + <echo message="Using war = ${warfile} "/> + <echo message="Jars used = ${cargo-uberjar} , ${cargo-antjar}"/> + + <cargo containerId="tomcat5x" home="${tomcat55.home}" + output="${tomcatlog.dir}/output.log" + log="${tomcatlog.dir}/cargo.log" action="start"> + <configuration dir="${tomcatconfig.dir}"> + <property name="cargo.servlet.port" value="8080"/> + <property name="cargo.logging" value="high"/> + <deployable type="war" file="${warfile}"/> + </configuration> + </cargo> + </target> + + <target name="start-tomcat50" depends=""> + <delete dir="${tomcatconfig.dir}" /> + <mkdir dir="${tomcatlog.dir}"/> + <mkdir dir="${tomcatconfig.dir}"/> + <echo message="Starting Cargo..."/> + <echo message="Using tomcat.home = ${tomcat50.home} "/> + <echo message="Using war = ${warfile} "/> + <echo message="Jars used = ${cargo-uberjar} , ${cargo-antjar}"/> + + <cargo containerId="tomcat5x" home="${tomcat50.home}" + output="${tomcatlog.dir}/output.log" + log="${tomcatlog.dir}/cargo.log" action="start"> + <configuration dir="${tomcatconfig.dir}"> + <property name="cargo.servlet.port" value="8080"/> + <property name="cargo.logging" value="high"/> + <deployable type="war" file="${warfile}"/> + </configuration> + </cargo> + </target> + + <target name="systest-tomcat50" + description="Execute system integration tests on Tomcat 5.0 with Cargo" + depends="copywar,start-tomcat50,systest" /> + + <target name="systest-tomcat55" + description="Execute system integration tests on Tomcat 5.5 with Cargo" + depends="copywar,start-tomcat55,systest" /> </project> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]