ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Problem deleting a file
Date Fri, 15 Jul 2011 03:24:46 GMT
On 2011-07-14, <andy.ling@quantel.com> 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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message