ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ciramella, EJ" <ECirame...@emptoris.com>
Subject RE: How to detect missing files when copying from a list of files ?
Date Tue, 11 Feb 2003 22:00:33 GMT
Could I ask for a little more detail?  There may be other ways around your
problem.  

What are you copying?  Build.dir could be many things...

Take a closer look at FileSet - "includesfile the name of a file; each line
of this file is taken to be an include pattern. ".  This means the
includesfile simply is a suggestion as to what patterns you should include.
If a file is missing, the copy isn't going to complain...

-----Original Message-----
From: Steve Allan [mailto:stevea@wrq.com]
Sent: Tuesday, February 11, 2003 4:52 PM
To: 'user@ant.apache.org'
Subject: How to detect missing files when copying from a list of files?


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 __ 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message