ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Re: "Copy" accepts FileList without any directory limitation - enhancement?
Date Mon, 11 Aug 2003 15:36:04 GMT

I always thought it would be nice to allow <copy> to take colon-separated 
directories like the <javac> task does.  I have a compile target that takes 
a path which can be a single directory or a colon-separated list of source 
directories.  I also need any resources such as xml, property, and other 
general files copied from each of those source directories.  The only way I 
can do this right now is to loop through these colon-separated paths using 
<foreach> which then calls another target which does file copying for the 
current directory in the loop.  The want for this functionality is 
legitimate, but having to resort to using a task which time and time again 
has been discouraged as being to scripty to add to Ant's core tasks is 
not.  It would be nice if Ant-1.6 included support for allowing this to 
work without resorting to <foreach>.

Jake

At 04:14 PM 8/11/2003 +0100, you wrote:
>On Monday 11 August 2003 14:59, Adam Hardy wrote:
> > You mean, nest the FileList inside a Path?
>Yep,
>or a path="path;..." form.
>
>However, the copy task has a <mapper/> element
>with uses the base directory of the <fileset>'s.
>
>This makes it difficult to modify <copy> to properly support <path>'s or
>any file name container without a base directory.
>
>Peter
>
> >
> > peter reilly wrote:
> > > It may be better to allow <copy/>
> > > to take a <path/> element.
> > > This would generalize better.
> > >
> > > Peter
> > >
> > > On Monday 11 August 2003 14:43, Adam Hardy wrote:
> > >>Currently this sort of task to copy a random bunch of files doesn't work:
> > >>
> > >><target name="testCopyFromDifferentDrives">
> > >>   <copy todir="." >
> > >>     <filelist
> > >>       files="D:/file1.tmp,F:/file2.tmp"/>
> > >>   </copy>
> > >></target>
> > >>
> > >>The user cannot use a FileList in the Copy, and even then, the FileList
> > >>demands a common directory to which the files in the list are all
> > >> relative.
> > >>
> > >>I have just submitted a enhancement
> > >>
> > >>http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22298
> > >>
> > >>with some patches that allow the user to do the above.
> > >>
> > >>I want to use this in my build.xml deploy target, so that I do not have
> > >>to name all the jars that I want to copy. With this change I can name
> > >>them all in a build.properties file and then do this:
> > >>
> > >><filelist files="${external.jars}"/>
> > >>
> > >>I can see other places where this is useful too, e.g. dist
> > >>
> > >>If you are in favour of this change, I humbly crave your indulgence to
> > >>grace this bug with a vote in bugzilla.
> > >>
> > >>:)
> > >>
> > >>Adam
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > > For additional commands, e-mail: user-help@ant.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org


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


Mime
View raw message