ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aalok singhvi <aaloksing...@gmail.com>
Subject Re: WELCOME to user@ant.apache.org
Date Sun, 14 Jun 2015 18:40:48 GMT
Hey Stephan,

I tried using "deleteonexit" and it is know allowing me to delete something
of the jars but not allowing me to delete 2 directories. It says the once
Ant JVM is terminated it can be deleted.

Can we terminate ant jvm and restart once this delete is completed. I know
its a stupid question but just wanted to see if you have seen this before
by any chance.

Let me check if I can extract a small build. i will need to get approvals
on that.

I tried executing a batch commands also and it is now allowing me to delete
some of the files when i execute it from ant. But when i execute as a
separate batch file it allows me to delete files in that workspace.

Thanks
Aalok

On Sun, Jun 14, 2015 at 2:31 PM, Stefan Bodewig <bodewig@apache.org> wrote:

> On 2015-06-14, aalok singhvi wrote:
>
> > 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
>
>
> https://github.com/apache/ant/blob/ANT_170/src/main/org/apache/tools/ant/taskdefs/Delete.java#L720
> is inside the branch that deletes a directory, not a single file.  And
> strangely there isn't even a line 769 in 1.7.0.  And 769 is inside
> removeDir and execute at the same time?  Strange.
>
> > As soon as build is done the main build file sets the classpath which
> > includes certain jars.
>
> Then this is a point where the jars may get locked - maybe there already
> is one before that.
>
> > 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.
>
> Yes, it does.  If you want to do anything like that, then you must not
> build a classloader holding the jars before you try to relace them.
> Otherwise the JVM locks them and there is nothing Ant can do.  And there
> is no way to force it, it is an OS level lock that Ant cannot lift.
>
> Is it possible you extract a small example build file that exhibits the
> problem and we can see whether we can improve it together so it works?
> Maybe open a Bugzilla issue for that since attaching files and trying
> patches back and force may be more convenient there.
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>


-- 
Aalok Singhvi

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message