ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas.che...@ascentialsoftware.com
Subject copy task with merge mapper bug?
Date Mon, 03 Dec 2001 15:40:40 GMT

I did not find any reports in the apache bug database, I was going to submit
one, but I'd like to check with you guys to make sure that this is really a
bug or if I misunderstood the way it is working.
A copy task with a fileset and a merge mapper is not producing a
concatenated file of all the source file (which is my understanding of what
the merge mapper should do). Instead, the result file specified by the merge
mapper will be equal to the last copied source file (I looked at the code,
each source file is copied as the destination file one after another,
overwriting the destination file every time) if the overwrite option is set
to true. If overwrite option is set to false, then the result file specified
by the merge mapper will be equal to the first copied source file (all the
other copy will not overwrite the first copy).

Is it the expected behavior, or is it a bug?

The following copy task:

<copy todir="." verbose="true">
  <fileset dir=".">
    <include name="file1"/>
    <include name="file2"/>
  </fileset>
  <mapper type="merge" to="result_file"/>
</copy>

result_file will be equal to file1.
If overwrite option is set to true in the copy task, result_file will be
equal to file2.
I was expecting result_file to be the concatenation of file1 and file2.

Thanks.

Thomas

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


Mime
View raw message