ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From detlef.bren...@canoo.com
Subject jar file locking with ant.
Date Tue, 16 Apr 2002 10:01:31 GMT
good morning ,
I run into a problem when using Ant 1.4.1

Heres my setup:
I have a project with different jar files for compiling my source code against it.
I then call the "build" and "clean" targets to generate all I need (no matter
how much
sense it makes to first build then clean in the same project.)
During the live cycle of on project instance (for both targets) it seems as if
the reffered Jar files
from the 'javac' classpath tag are not beeing closed.
The effect is that the second target 'clean' fails because the project instance
still holds a handle to used jar files.

I checked the cleanup() method of the AntClassLoader and for some reason it only
frees the zip resource files.

>From my point of view I dont see a benefit of holding these handles after using
<javac> until the project has finished.

My questions now are :

a) Is this a known problem to the Ant community and has somebody found a way
around it ?

b) is this a intended behaviour of Ant ? or is it a situation which hasnt been
thought about in the first place.


any help would be appreciated,

regards,
detlef brendle



************* build snipplet **************
<javac
		includeAntRuntime="no"
		extdirs=""
		destdir="${BASE_DIR}/classes"
		>
		<src path="${BASE_DIR}/prod/src" />
		<include name="**/*.java"/>
		<exclude name="**/doc-files/*" />
		<classpath>
			<path refid="computed.path" /> <!-- something like <pathelement
location="servlet.jar" /> <pathelement location="saxp.jar" />
		</classpath>
</javac>

**************clean snipplet ***********

<delete>
	<fileset dir="${BASE_DIR}" excludes="*.java" />
</delete>

***************************************





--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message