On 2011-07-14, <[email protected]> wrote:
> One of the tasks in my build script deletes a target file before it is
> rebuilt. The trouble is the file doesn't actually seem to get deleted
> until after ant exits. This causes ant to generate an error when it
> tries to create the new version of the file.
> Below is the relevant bit of the build script in case there is
> something I'm doing wrong. The file in question is Quentin.jar.
Is Quentin.jar on the CLASSPATH or loaded via <classpath> or similar
measures during the build process? If so Java's classloader probably
still has a lock on it and Windows won't delete it until Ant exits.
> <target name="Quentin" if="docompile" depends="init">
> <javac includeantruntime="false" srcdir="${tmp-dir}"
> includes="com\quantel\Quentin\**" destdir="${outdir}" debug="${debug}"
> source="${source}">
> <compilerarg line="${compiler_cmdline}"/>
> </javac>
> </target>
This could be a candidate (depending on ${compiler_cmdline}), forking
javac would help in this case.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]