ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: <delete> task problem
Date Wed, 30 Oct 2002 21:00:37 GMT
It's likely that like you suggest, the <ant> call still holds on to the file
handles of some of these JARs, thus the <delete> takes fails to delete those
files. The only way to ensure all resources to be released would be to fork
the <ant> call, but unfortunately it is not possible at this time.

What you could do on the other end, since your have inheritAll="false",
would be to <exec> Ant on the sub-build file. You loose some correct
forwarding of the log messages to the parent build (you can still see the
messages, they just don't go thru the same pipes).

This is what I do (<exec>ing Ant) for example. Hope this helps. --DD

  <target name="exec-ant">
    <path id="ant-CLASSPATH">
      <fileset dir="${ant.home}/lib" includes="*.jar" />
    <property name="ant-CLASSPATH" refid="ant-CLASSPATH" />

    <exec executable="${java.home}/../bin/java.exe"

      <arg value="-classpath" />
      <arg path="${ant-CLASSPATH}" />

      <arg value="" />
      <arg value="${verboseArg}" />
      <arg value="-logger" />
      <arg value="" />
      <arg value="-emacs" />
      <arg value="-buildfile" />
      <arg value="${antfile}" />

      <arg value="${target}" />

-----Original Message-----
From: Hari Kodungallur [] 
Sent: Wednesday, October 30, 2002 2:48 PM
Subject: <delete> task problem

i have a problem with the delete task

i do the following

      <ant inheritall="false" dir="../module"/>



<delete dir="${my.lib}">

The delete does not delete anything in the my.lib directory. The 
ant task in the <try> block calls the build.xml in module. This 
ant uses (in classpath) some of the jar files i have in my.lib.  
Can that cause the problem with the delete?
When I put the delete before doing the build on module, it deletes 
the the my.lib. But I want to do the delete after the module's 

Any idea why the <delete> in example is not working?


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message