ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Kost <s.k...@webmacher.de>
Subject Re: copy one file to multiple directories
Date Tue, 07 May 2002 13:21:15 GMT
Hi,
> On 07 May 2002, Stefan Kost <s.kost@webmacher.de> wrote:
> 
> > but would like to know if a different solution is known.
> 
> write a custom mapper that return multiple file names and use that in
> your <copy> task.
> 
I needed the templates, because the xpath function document() failes for
non-existent targets. I did a workaround for that for now.

As my point of view the reason for the existance of ant is that one has
*not* to write individual scripts/helpers and stuff. I've posted my
problem, so that this need becomes publicly documented and is maybe
considered for further development.

possible solutions I can think of :
1.) allowing the touch-task to have a mapper would have helped me.
Then I could have supplied a fileset based on some expression and used a
mapper to make up my (not yet existing) filenames.
2.) an attribute overwrite on style-task would have helped me.
Then I would create these files with a stylesheet out of other files, if
they are not yet there. Anyway I would consider this individual solution
as a hack.
3.) extending the copy-task, so that if "file" is given, but neither
"toDir" nor "toFile" the the embedded "<fileset>" specifies destination
filenames.

I personally like the last solution (3) the most.

Stefan.


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


Mime
View raw message