ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Magesh Umasankar" <umag...@rediffmail.com>
Subject [PATCH] Single File Filesets can be used with toFile attr. for copy and move tasks.
Date Wed, 10 Oct 2001 20:53:53 GMT

I am resending this as I notice that the mail that I 
sent after this had reached the group, but this hadn't.  
Apologies if both of these make it, instead of just 1.


Let me direct your attention to this thread on ant-user.

http://marc.theaimsgroup.com/?t=100258096800004&w=2&r=1

Specifically to Pete's comment...
=====
Or perhaps more simply

  <move tofile="my/jndi/dir/jndir.jar">
    <fileset dir="my/jndi/dir">
      <include name="jndi*.jar"/>
    </fileset>
  </move>
=====

In the above case, Pete has suggested the user use
Fileset to resolve pattern mappings issue instead of
going for regexps.  The only problem the use of this
approach is that if jndi*.jar results in multiple files
in the fileset, we won't know how to move them all to
a single file.

However, if the pattern jndi*.jar in my/jndi/dir 
returns only one file, a valid copy/move should be
performed (logical user expectation).

But, as it is now, the Copy and Move tasks will not
let the user use toFile and FileSets even if there is
no (src)file attribute specified and the fileset
contains just one file.

Here is a patch that looks into the fileset before
dismissing it outright.  Once this patch is in place
Pete's suggestion in the user group will work so long
as the pattern doesn't result in multiple files.

Thanks,
Magesh
 


Mime
View raw message