ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edwin.Guenth...@Compart.net
Subject About deleting jar files - i think it is a clear BUG
Date Mon, 04 Dec 2000 09:47:55 GMT
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




Mime
View raw message