You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2003/07/03 20:04:00 UTC
DO NOT REPLY [Bug 21320] New: -
Copy task ignores all but first file returned by FileNameMapper
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21320>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21320
Copy task ignores all but first file returned by FileNameMapper
Summary: Copy task ignores all but first file returned by
FileNameMapper
Product: Ant
Version: 1.5.3
Platform: All
URL: n.a.
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Core
AssignedTo: dev@ant.apache.org
ReportedBy: eeaston@ptc.com
The documentation for org.apache.tools.ant.util.FileNameMapper states "Used to
find the name of the target file(s) corresponding to a source file." Note the
use of the word "file(s)."
Further the API:
java.lang.String[] mapFileName(java.lang.String sourceFileName)
shows that you can map a single file name to many.
However, the copy task ignores all but the first mapped file name. See line
489 of 1.5.3-1 source for org.apache.tools.ant.taskdefs.Copy:
for (int i = 0; i < toCopy.length; i++) {
File src = new File(fromDir, toCopy[i]);
>>> File dest = new File(toDir, mapper.mapFileName(toCopy[i])[0]);
map.put(src.getAbsolutePath(), dest.getAbsolutePath());
}
Copy and potentially other tasks that know about mappers should be fixed to
fulfill the expectations set by the FileNameMapper javadoc and API declaration.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org