Processing a List of Files/Paths for copying

C

citizenkahn

I have a quick question. I have a posting build script that is batch
file now and I'm converting it over to ant. I have used copy and
filesets. It works reasonable well, but doesn't fail when a file is
missing. If a pattern yields no results the "build" still completes
successfully.

Example:
<copy todir="${doc}/API/AdminAPIUtil" flatten="yes">
<fileset dir="${basedir}/src/Admin/Foo" casesensitive="False">
<include name="*.cs"/>
<include name="Release/This.jar" />
</fileset>
</copy>


I looked at the DTD for an attribute that I might be missing, but there
was nothing. Hence, I'm not using the right task for my purposes.

Ideally, I would have an external list of groups of file and the ant
script would process this. I'd like to do this with the filelist
object, but it appears that a file list can not be used in copying.
This will be a script that needs modification by a wide array of folks
and I want to keep the area modified really clear for them.

Is there a way by which I can have objects that define specific files
and use them to copy these files somewhere?

Any ideas as to how folks usually solve this kind of thing? Thanks
for help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top