at org.apache.tools.ant.taskdefs.Delete.handle(Delete.java:720) at org.apache.tools.ant.taskdefs.Delete.removeDir(Delete.java:769) org.apache.tools.ant.taskdefs.Delete.removeDir(Delete.java:765) org.apache.tools.ant.taskdefs.Delete.execute(Delete.java:769) org.apache.tools.ant.UnkownElement.execute(UnkownElement.java:291) at sun.reflect.GeneratedMethodAccessor6.invoke( Unknown Source)
Apache ant 1.7.0 As soon as build is done the main build file sets the classpath which includes certain jars. Know what I am trying to do is before even importing those jars i am trying to check if they were present in the project folder or not. If they were delete them and copy newer version from a FTP location and then set the classpath. I hope this makes sense. Can you suggest a work around. On Sun, Jun 14, 2015 at 1:08 PM, Stefan Bodewig <bode...@apache.org> wrote: > [please don't drop the user list from replies] > > On 2015-06-14, aalok singhvi wrote: > > > When i use verbose to print errors.... its gives certain info as > follows... > > > It errors out on ant taskdef delete handle > > Delete.java line 720, 769 765 and 586. > > It owuld be better if you could paste the full stack trace - and even > more important - tell us the exact version of Ant you are using (output > of "ant -version") > > > I am on Win7. > > On Windows files may be locked by processes that have opened it - which > includes Ant itself, so this means you may run into trouble of you try > to remove something that has been touched by Ant before. > > > I am deleting this file before it is copied over to the project and used > in > > classpath. > > If it was part of your CLASSPATH environment variable, Java would load > it when starting Ant and there is no chance for Ant to remove it. > > I'm not sure how you copy the file after you've deleted it :-) > > If you copy the file (using Ant) before trying to delete it, the file > may still be considered open by Windows. This is a known problem and > Ant tries to work around it by registering the file as "deleteOnExit". > Even with 1.7.0 you should see a message about "This attempts to delete > the file when the Ant jvm has exited and might not succeed" in this > case. > > Stefan > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@ant.apache.org > For additional commands, e-mail: user-h...@ant.apache.org > > -- Aalok Singhvi