ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanislas Pinte <stan.pi...@wanadoo.be>
Subject Re: About deleting jar files - i think it is a clear BUG
Date Mon, 04 Dec 2000 09:59:45 GMT

A possible solution could be to check if any of the files to be deleted are 
in the classpath ( guess there is some API to poll the VM about that) once 
we know they are in, we specifically tell the VM to remove them from the cp.

Stan

At 10:47 AM 12/4/00 +0100, you wrote:
>Hello,
>
>I have seen that other people already encountered a problem:
>it is not possible to delete jar files. There was some discussion about
>this
>topic last month but I think that I can add another point:
>
>I had the same problem: I specify a directory to delete / build
>where I will later place the _result_ of my build process: a jar-file.
>First run is fine, but as soon as the jar file exists, build fails.
>
>A closer look showed me the reason:
>
>when ant starts, it will setup the property
>
>java.class.path
>
>I dont know why, but the jar-file that I want to DELETE appears in
>this list, too. To me it It looks like every jar-file that is found is
>included in the value
>for java.class.path. In my eyes this behaviour is just a plain BUG:
>
>I dont need the jar file for compiling; neither is it necessary to appear
>in ANY classpath. Whoever is responsible for determing the
>value for java.class.path should ensure that such jar-files are omitted!
>
>BTW: someone suggested to use exec to delete the jar-file
>manually. But that cant work out either: as soon as the file appears
>in the classpath, it will locked by the JVM. Locked files cant be deleted.
>Not from ant, not from any other process. Period.
>
>So please change this. It is really a very annoying BUG:
>in a Java environment it is very natural to build JAR-files. Therefore
>deleting JAR-files is natural as well. Now I have to write script that
>delete the file before calling ant ... not a very sophisticated solution.
>
>regardes,
>
>edwin g√ľnthner

-------------------------------------------------------

Stanislas Pinte
Software engineer - Trademine-europe
Tel: 00 32 486 67 78 86

-------------------------------------------------------


Mime
View raw message