Browse Source

create manifest file's parent if needed.

Bugzilla Report 66231
master
Stefan Bodewig 2 years ago
parent
commit
39c9b0c938
2 changed files with 12 additions and 0 deletions
  1. +4
    -0
      WHATSNEW
  2. +8
    -0
      src/main/org/apache/tools/ant/taskdefs/ManifestTask.java

+ 4
- 0
WHATSNEW View File

@@ -59,6 +59,10 @@ Other changes:
performance in some special cases.
Bugzilla Report 66048

* <manifest> will now create the parent directory of the manifestFile
attribute if it doesn't exist.
Bugzilla Report 66231

Changes from Ant 1.10.11 TO Ant 1.10.12
=======================================



+ 8
- 0
src/main/org/apache/tools/ant/taskdefs/ManifestTask.java View File

@@ -238,6 +238,14 @@ public class ManifestTask extends Task {
error = new BuildException("Failed to read " + manifestFile,
e, getLocation());
}
} else {
final File parent = manifestFile.getParentFile();
if (parent != null && !parent.isDirectory()
&& !(parent.mkdirs() || parent.isDirectory())) {
throw new BuildException(
"Failed to create missing parent directory for %s",
manifestFile);
}
}

// look for and print warnings


Loading…
Cancel
Save