Is there anyway to start up tomcat from within ant, and then continue
running? I'm trying to run some cactus tests from within ant, but of course
I need the compiled files to be available to tomcat for this to work. The
problem is that the tomcat process never returns, and so ant hangs on the
exec. Setting a timeout doesn't seem to help.
Any ideas?
The relevant section of build.xml:
<echo>Making utils.jar in webapps for testing</echo>
<jar jarfile="${webapps}/utils.jar" basedir="${build}"/>
<echo>Copying commons-cactus.jar to webapps</echo>
<copy todir="${webapps}">
<fileset dir="d:/classpath">
<include name="*cactus*.jar" />
</fileset>
</copy>
<echo>Firing up tomcat</echo>
<exec dir="${tomcat}" executable="cmd.exe" os="Windows 2000">
<arg line="/c tomcat run"/>
</exec>
<echo>Now running the tests</echo>
<junit printsummary="yes"
fork="no"
haltonfailure="no">
<formatter type="xml" />
<test name="sinfo.utils.UtilsTestSuite" />
</junit>
<echo>Shutting down tomcat</echo>
<exec dir="${tomcat}" executable="cmd.exe" os="Windows 2000">
<arg line="/c tomcat stop"/>
</exec>
<echo>Now deleting the jar files copied</echo>
<delete>
<fileset dir="${webapps}">
<include name="**/utils.jar"/>
<include name="**/*cactus*.jar"/>
</fileset>
</delete>
Jim
--
* Jim Cheesman *
Trabajo: [EMAIL PROTECTED] - (34)(91) 724 9200 x 2360
Personal: [EMAIL PROTECTED] (34) 606 770 244
Practice safe eating -- always use condiments.