ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Allan <ste...@wrq.com>
Subject How to detect missing files when copying from a list of files?
Date Tue, 11 Feb 2003 21:51:42 GMT
I'm having a recurring problem which I haven't been able to solve
in Ant. As an example, say I have a file manifest which contains 
all the files I expect to have in my distribution. I copy that to a 
staging directory with copy and fileset:

<copy todir = "${stage.dir}">
  <fileset dir = "${build.dir}" includesfile = "${file.lst}"/>
</copy>

The problem is that if there are files in ${file.lst} that are missing
(perhaps never built), fileset throws them out and copy never knows
anything about them. It seems like <filelist> would solve that
problem, because it would pass all the file names to <copy>, and then
<copy> would complain about the missing ones. But <copy> won't accept
a filelist. I really need the task to fail if any file in ${file.lst}
is not found in ${build.dir}. 

Is there a cookbook solution to this problem?

-- Steve __ 

Mime
View raw message