You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2001/06/14 17:38:21 UTC
[Bug 2183] New: - Ant fails while trying to delete an existing non read-only file.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2183
*** shadow/2183 Thu Jun 14 08:38:21 2001
--- shadow/2183.tmp.19769 Thu Jun 14 08:38:21 2001
***************
*** 0 ****
--- 1,80 ----
+ +============================================================================+
+ | Ant fails while trying to delete an existing non read-only file. |
+ +----------------------------------------------------------------------------+
+ | Bug #: 2183 Product: Ant |
+ | Status: NEW Version: 1.3 |
+ | Resolution: Platform: Other |
+ | Severity: Normal OS/Version: Windows NT/2K |
+ | Priority: Other Component: Core tasks |
+ +----------------------------------------------------------------------------+
+ | Assigned To: ant-dev@jakarta.apache.org |
+ | Reported By: Jerome@jeromelacoste.com |
+ | CC list: Cc: |
+ +----------------------------------------------------------------------------+
+ | URL: |
+ +============================================================================+
+ | DESCRIPTION |
+ The following build file reproduces the bug. Copy it under the root of your Ant
+ version, and run Ant on it.
+ The build will fail in the clean target with the following error:
+
+ clean:
+ [delete] Deleting: F:\Projects\xxxx\zipfile1.zip
+
+ BUILD FAILED
+
+ F:\Projects\xxxx\antbug.xml:40: Unable to delete file
+ F:\Projects\xxxx\zipfile1.zip
+
+ Note: by commenting out some of the task (as described in the build file), the
+ build succeeds.
+
+
+ -----------------------
+ <project name="mc_ro" default="zip" basedir="." >
+ <!-- comment out if you have an Ant version with JDepend task integrated -->
+ <!-- <taskdef
+ name="jdepend"
+
+ classname="org.apache.tools.ant.taskdefs.optional.jdepend.JDependTask"
+ >
+
+ <classpath>
+ <pathelement path="${classes.dir}"/>
+ <pathelement location="lib/jdepend/jdepend.jar"/>
+ <pathelement location="lib/jdepend/JDependTask.jar"/>
+
+ </classpath>
+ </taskdef>
+ -->
+
+ <target name="jdepend">
+ <!-- comment out the jdepend task and it works -->
+ <jdepend
+ outputFile="depend_out.txt">
+ <classpath refid="project.classpath"/>
+
+ <sourcespath>
+ <pathelement location="src" />
+ </sourcespath>
+ </jdepend>
+ </target>
+
+ <target name="zip" depends="clean">
+ <zip zipfile="zipfile1.zip" basedir="docs" includes="**" />
+ <!-- or comment out the second zip task and it works -->
+ <zip zipfile="zipfile2.zip">
+ <zipfileset src="zipfile1.zip" />
+ </zip>
+
+ <!-- or comment out the antcall task and it works -->
+ <antcall target="clean" />
+ </target>
+
+ <target name="clean">
+ <!-- or comment out the first delete task and it works -->
+ <delete file="zipfile1.zip"/>
+ <delete file="zipfile2.zip"/>
+ <delete file="jdepend_out.txt"/>
+ </target>
+ </project>
\ No newline at end of file