----- Original Message -----
Sent: Saturday, June 09, 2001 2:20
AM
Subject: [cactus] Using Cactus with
JBoss-2.2.1 with Embedded Tomcat
Since I have not seen anything posted on
this archive regarding
usage of
jboss-2.2.1 with embedded tomcat and cactus, here is a snippet from
build.xml
which successfully starts
and stops JBoss.
Cactus creators: Thanks for creating
cactus. It is great!!
<target
name="tests_jboss_221" depends="init,prepare_tests_jboss_221"
if="jboss.home.221">
<!-- Start the servlet
engine, wait for it to be started, run the
unit tests, stop the servlet engine, wait for it to be stopped.
The servlet engine is stopped if the tests fail for any reason -->
<runservertests testURL="http://localhost:8080/test"
startTarget="start_jboss_221"
stopTarget="stop_jboss_221"
testTarget="cactustests"/>
</target>
<target name="start_jboss_221">
<java classname="org.jboss.Main" fork="yes"
dir="${jboss.home.221}/bin">
<classpath>
<pathelement location="${java.home}/../lib/tools.jar"/>
<fileset dir="${jboss.home.221}/bin">
<include name="run.jar"/>
</fileset>
</classpath>
</java>
</target>
<target
name="stop_jboss_221">
<java
classname="org.jboss.Shutdown" fork="yes">
<classpath>
<pathelement location="${java.home}/../lib/tools.jar"/>
<fileset dir="${jboss.home.221}/lib/ext">
<include name="jboss.jar"/>
</fileset>
</classpath>
</java>
</target>
<target
name="check_tests_jboss_221" depends="testwar"
unless="jboss.home.221">
<echo
message=""/>
<echo
message="*********************************************************"/>
<echo message="WARNING : The 'jboss.home.221' property has not been
set."/>
<echo
message=" No test will
be run on that servlet engine."/>
<echo
message="*********************************************************"/>
<echo message=""/>
</target>
<target
name="prepare_tests_jboss_221" depends="check_tests_jboss_221"
if="jboss.home.221">
<property name="tomcat.home.32"
value="${tomcat.home.32}"/>
<filter
token="tomcat.home.32" value="${tomcat.home.32}"/>
<!--
Delete some config file so that they will be copied every time -->
<delete file="${tomcat.home.32}/conf/tomcat.conf"/>
<!--
Copy the war file -->
<copy
file="${build.dir}/test.war"
tofile="${jboss.home.221}/deploy/test.war"/>
</target>