Browse Source

improve logging

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@818143 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 15 years ago
parent
commit
3935277bce
1 changed files with 10 additions and 2 deletions
  1. +10
    -2
      src/main/org/apache/tools/ant/taskdefs/Get.java

+ 10
- 2
src/main/org/apache/tools/ant/taskdefs/Get.java View File

@@ -105,11 +105,19 @@ public class Get extends Task {
dest = new File(destination, path);
} else {
FileNameMapper mapper = mapperElement.getImplementation();
String[] d = mapper.mapFileName(r.getName());
if (d == null || d.length != 1) {
String[] d = mapper.mapFileName(source.toString());
if (d == null) {
log("skipping " + r + " - mapper can't handle it",
Project.MSG_WARN);
continue;
} else if (d.length == 0) {
log("skipping " + r + " - mapper returns no file name",
Project.MSG_WARN);
continue;
} else if (d.length > 1) {
log("skipping " + r + " - mapper returns multiple file"
+ " names", Project.MSG_WARN);
continue;
}
dest = new File(destination, d[0]);
}


Loading…
Cancel
Save