ant-dev mailing list archives

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

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

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"/>

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.


View raw message