Hi, I'm using ant 1.8.2 on Windows 7/64 bit
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. If I have a window open on the directory containing this file, I can see it doesn't get deleted until after ant exits. When this happens, ant fails with the error idl_compile: [echo] Creating Quentin JAR [jar] Building jar: P:\Quentin\Manager\Java\tmp\Quentin.jar [move] Moving 1 file to P:\Quentin\Manager\Java\jars BUILD FAILED P:\Quentin\Manager\build.xml:459: Failed to copy P:\Quentin\Manager\Java\tmp\Quentin.jar to P:\Quentin\Manager\Java\jars\Quentin.jar due to P:\Quentin\Manager\Java\jars\Quentin.jar (Access is denied) Any help would be much appreciated Regards Andy Ling <target name="init" unless="init_done"> <uptodate property="quentin_jar_ok" targetfile="${jar-files}\Quentin.jar"> <srcfiles dir="${root}/idl" includes="Quentin.idl"/> </uptodate> <property name="init_done" value="true"/> </target> <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> <target name="idl_compile" if="docompile" depends="init,Quentin"/> <target name="idl_renew_src" depends="init"> <delete dir="${tmp-dir}\com\quantel\Quentin"/> <delete file="${jar-files}\Quentin.jar"/> <!-- Make sources --> <echo>Building Quentin from IDL</echo> <exec executable="${env.JACORB_HOME}\bin\idl.bat"> <arg value="-all"/> <arg value="-genEnhanced"/> <arg value="-d"/> <arg value="${tmp-dir}"/> <arg value="-i2jpackage"/> <arg value="Quentin:com.quantel.Quentin"/> </exec> </target> <target name="Quentin.jar" unless="quentin_jar_ok" depends="init"> <antcall target="idl_renew_src"/> <antcall target="idl_compile"/> <echo>Creating Quentin JAR</echo> <jar jarfile ="${tmp-dir}\Quentin.jar"> <fileset dir="${outdir}"> <include name="com/quantel/Quentin/**/*.class" /> </fileset> </jar> <move file="${tmp-dir}\Quentin.jar" todir="${jar-files}"/> </target> -- This e-mail is intended for the named addressees only. Its contents may be privileged or confidential and should be treated as such. If you are not an intended recipient please notify the sender immediately and then delete it; do not copy, distribute, or take any action based on this e-mail. In the pursuit of its legitimate business activities and its conformance with relevant legislation, Quantel may access any e-mail (including attachments) it originates or receives, for potential scrutiny. Quantel is the trade name used by Quantel Holdings Limited and its subsidiaries. Quantel Holdings Limited is registered in England & Wales. Registration No: 4004913 Contact details for all Quantel Offices and Companies can be found on our website www.quantel.com or by writing to the holding company. Registered address: Turnpike Road, Newbury, Berkshire, RG14 2NX, United Kingdom --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org