1) Have a file locked by other program (e.g. with
2) Try to overwrite this file by 'copyfiles' ant
task (used for copying libraries to WEB-INF/lib on
There should be an error message that the file
couldn't be rewritten. Now it doesn't report any
This is not a bug. The <copy> task does not report any errors either.
When we switch to copy task in 4.1 (hopefully) you will not get any
error. The failonerror parameter of copy task is true by default so
this is not considered to be an error.
(Our copyfiles actually delegates to copy internally; I also created a
simple ant file and tested... see for yourself if you do not believe:-)
If you still believe there should be some warning message shown to the
user file and enhancement and I will try to figure our how to do it in
<project name="foo" default="test">
<!-- <copyfiles files="userdir.zip" todir="foo"/>-->
<copy file="userdir.zip" todir="foo"/>