Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Unable to delete WEB-INF\\lib\*.jar using ant

843836Mar 10 2005 — edited Oct 25 2005
Using ant to build struts.
This is part of the build.xml for struts-example.war

<property name="deploy.dir" value="${tomcat.home}/webapps"/>

<target name="cleanWebApp">
<delete file="${deploy.dir}/${war.file.name}" />
<delete dir="${deploy.dir}/${war.file}" includeEmptyDirs="true" />
</target>

But when I try to build and reload it to tomcat, it gives me errors:

cleanWebApp:
[delete] Deleting: D:\jakarta-tomcat-5.5.7\webapps\struts-example.war
[delete] Deleting directory D:\jakarta-tomcat-5.5.7\webapps\struts-example

BUILD FAILED
D:Java\code\struts\strutsexamples\build.xml:46: Unable to delete file D:\jakarta-tomcat-5.5.7\webapps\struts-example\WEB-INF\lib\commons-digester.jar

Also lib\struts.jar(maybe more) can't be deleted.

Now I have to stop tomcat, delete it manually, and reinstall the war.
How can I fix this problem?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 22 2005
Added on Mar 10 2005
11 comments
1,352 views