• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Ant Undeploy Problem

 
Ranch Hand
Posts: 511
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello again,

I am using JDK 1.5, Eclipse 3.2 (bundled with Ant 1.6.5), and Tomcat 5.5.9 on WinXP.

I created the following Ant build script:



build.properties:


In my project directory, I have a sub-directory named "lib" which contains the particular jar files that I need for my web app. As you can see from looking at my build script, that this lib (after being unextracted from my war file) becomes placed underneath my WEB-INF directory after deployment (which its supposed to do).

Now, my problem is this:

1. When I run the undeploy Ant target from Eclipse's Ant View, I receive this error message:



At first, I thought that this was an Eclipse issue because when I tried to delete the NumberGuess directory under TOMCAT_HOME/webapps manually using Windows Explorer, it stated that another program or person was using this file/folder and that it was unable to do so. When I closed Eclipse and re-tried to manually delete the TOMCAT_HOME/webapps/numberguess folder from Windows Explorer, I was successful.

This led me to believe that it was just an Eclipse issue, but evidently, one can see the same thing happened when I didn't have Eclipse running and ran it from the command line (MS-DOS).

After some more investigation, I discovered that the problem was that I was running Tomcat when I tried to undeploy this application. When I shutdown Tomcat and tried to deploy/undeploy from Eclipse and the command line, it worked!

When I put this app onto a live tomcat server (which can not afford to be shutdown), my solution (which is manually shutdowning the Tomcat and then running my Ant undeploy target) will not be feasible.

Some questions:

(1) Is there a better way to structure an undeploy Ant target?

(2) Should I be using these built-in Ant deploy and undeploy tasks, instead:

- org.apache.catalina.ant.DeployTask

- org.apache.catalina.ant.UndeployTask

Many, many thanks!
[ December 06, 2006: Message edited by: Unnsse Khan ]
 
Yes, my master! Here is the tiny ad you asked for:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic