I'm going nuts. I've been trying to get ANT to re-deploy a webapp to Tomcat 5 via AnthillPro. Works from command line, but hangs AnthillPro.
 
A little background... I first tried the ant-tomcat tasks to simply undeploy/deploy but the Flex app (inside util.war) has problems undeploying - there is a directory filled with jars that cannot be removed. 
 
So I decided to just stop tomcat, wipe out the directory and redeploy...
 
It all works... the build is a success... but Anthillpro hangs at the end. :-(
 
I just don't get it. (I've tried exec with startup and startup-using-launcher... with and without spawn. It really does need spawn, otherwise it understandibly does not finish the build process.
 
Ideas?
Timo
 
 
 
INFO - Buildfile: remote-deploy.xml
INFO -
INFO - tc5stop:
INFO -      [exec] Using CATALINA_BASE:   C:\java\jakarta-tomcat-5.0.28
INFO -      [exec] Using CATALINA_HOME:   C:\java\jakarta-tomcat-5.0.28
INFO -      [exec] Using CATALINA_TMPDIR: C:\java\jakarta-tomcat-5.0.28\temp
INFO -      [exec] Using JAVA_HOME:       C:\java\j2sdk1.4.2_03
INFO -
INFO -
INFO -
INFO - wait:
INFO -
INFO - cleanwebapp:
INFO -    [delete] Deleting directory C:\java\jakarta-tomcat-5.0.28\webapps\util
INFO -    [delete] Deleting: C:\java\jakarta-tomcat-5.0.28\webapps\util.war
INFO -
INFO - copywar:
INFO -      [copy] Copying 1 file to C:\java\jakarta-tomcat-5.0.28\webapps
INFO -
INFO - tc5start:
INFO -      [echo] Started TC5
INFO -      [echo] Going to inline sleep...
INFO -      [echo] Waking up
INFO -
INFO - stop-remove-install:
INFO -      [echo] Stopped TC, cleaned up, moved in the war, and restarted
INFO -
INFO - BUILD SUCCESSFUL
INFO - Total time: 13 seconds
 
 
  <taskdef file="${ant-contrib.dir}/tomcatTasks.properties">
        <classpath>
            <pathelement path="${tomcat5.home}/server/lib/catalina-ant.jar"/>
        </classpath>
    </taskdef>
 
    <target name="stop-remove-install" depends="tc5stop,wait,cleanwebapp,copywar,tc5start,wait">
        <echo message="Stopped TC, cleaned up, moved in the war, and restarted" />
    </target>
 
    <target name="wait" >
     <sleep seconds="5"/>
    </target>
   
    <target name="tc5start" >
        <echo message="Started TC5" />
     <exec executable="${tomcat5.home}/bin/startup-using-launcher.bat" spawn="true" >
     <env key="CATALINA_HOME" value="${tomcat5.home}" />
     </exec>
        <echo message="Going to inline sleep..." />
        <sleep seconds="5"/>
        <echo message="Waking up" />
    </target>
 
    <target name="tc5stop" >
    <exec executable="${tomcat5.home}/bin/shutdown.bat" failifexecutionfails="false" failonerror="false">
         <env key="CATALINA_HOME" value="${tomcat5.home}" />
         </exec>
    </target>
   
    <target name="cleanwebapp">
      <delete dir="${tomcat5.home}/webapps/${project.jvm}" />
      <delete file="${tomcat5.home}/webapps/${project.jvm}.war" />
    </target>
 

    <target name="copywar" description="Install application in Tomcat" >
        <copy file="${project.dist.dir}/${project.jvm}.war"
            todir="${tomcat5.home}/webapps/" />
    </target>

Reply via email to