For some reason, the copy task doesn't support filelists. What happened?
A filelist may include files that do not exist. How could you copy such a file? If you really needed to do this, you could write a macro to touch the files from a filelist, convert it to a fileset, and then copy them.
<copy> could fail in this situation.
Which situation? Using filelists, or using the touch workaround?
I meant if a file does not exist, <copy> should just fail.
Then, again, why allow filelists in the first place, if copying a nonexistent file triggers failure?
Why not think in broader terms than just <copy>, and provide a way to create a fileset from a filelist, one that -on the point of creation- resolves what the policy on missing files is. That is, it can skip them, or it can fail. -steve
Creating a fileset from a filelist should already be doable using pathconvert. So all that is really needed is a condition asserting that all files in a filelist exist, no?
Or, one could create the fileset from the filelist using a pathconvert as suggested, then do another pathconvert on the created fileset and if the two are not equal, files are missing from the filelist...
current behaviour of tasks using the filelist for non-existent files: Concat: Log an error but contine DependSet: Log an warning and continue ExecuteOn: Pass on the missing file to the command PathConvert: just described above SubAnt -> Path: Log a warning and continue or throw an exception dependent on parameter. Touch: Create the file if it does not exist. As copy already has the fail on error i'd say follow the SubAnt behaviour: Log a warning and continue or throw an exception dependent on the failonerror parameter. It doesn't seem to be straightforward to extend FileList in such a way that it would fail / create file / remove from list / pass-on the non-existent files in both a backward compatible and consistent way.
<copy> is slated to be modified to support all resource collection types.
fixed in 1.7 (HEAD)