Browse Source

<apply> with nested <filelist> didn't check out-of-dateness.

PR: 26985


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@276168 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 21 years ago
parent
commit
be91e2871f
2 changed files with 21 additions and 1 deletions
  1. +3
    -0
      WHATSNEW
  2. +18
    -1
      src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java

+ 3
- 0
WHATSNEW View File

@@ -64,6 +64,9 @@ Fixed bugs:
* Throw build exception if target repeated in build file, but allow targets
to be repeated in imported files.

* <apply> didn't compare timestamps of source and targetfiles when
using a nested <filelist>. Bugzilla Report 26985.

Other changes:
--------------



+ 18
- 1
src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java View File

@@ -312,7 +312,7 @@ public class ExecuteOn extends ExecTask {
for (int i = 0; i < filelists.size(); i++) {
FileList list = (FileList) filelists.elementAt(i);
File base = list.getDir(getProject());
String[] names = list.getFiles(getProject());
String[] names = getFilesAndDirs(list);

for (int j = 0; j < names.length; j++) {
File f = new File(base, names[j]);
@@ -536,6 +536,23 @@ public class ExecuteOn extends ExecTask {
}
}

/**
* Return the list of files or directories from this FileList that
* should be included on the command line.
*
* @since Ant 1.6.2
*/
protected String[] getFilesAndDirs(FileList list) {
if (mapper != null) {
SourceFileScanner sfs = new SourceFileScanner(this);
return sfs.restrict(list.getFiles(getProject()),
list.getDir(getProject()), destDir,
mapper);
} else {
return list.getFiles(getProject());
}
}

/**
* Runs the command in "parallel" mode, making sure that at most
* maxParallel sourcefiles get passed on the command line.


Loading…
Cancel
Save