git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@807960 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -252,6 +252,7 @@ Rami Ojares | |||||
| Randy Watler | Randy Watler | ||||
| Raphael Pierquin | Raphael Pierquin | ||||
| Ray Waldin | Ray Waldin | ||||
| Remie Bolte | |||||
| Richard Evans | Richard Evans | ||||
| Rick Beton | Rick Beton | ||||
| Robert Anderson | Robert Anderson | ||||
| @@ -919,6 +919,10 @@ Other changes: | |||||
| HTTP connections at the HttpUrlConnection level. | HTTP connections at the HttpUrlConnection level. | ||||
| Bugzilla Report 41891. | Bugzilla Report 41891. | ||||
| * <tar> and <zip> (and tasks derived from <zip>) will now create the | |||||
| parent directory of the destination archive if it doesn't exist. | |||||
| Bugzilla Report 45377. | |||||
| Changes from Ant 1.7.0 TO Ant 1.7.1 | Changes from Ant 1.7.0 TO Ant 1.7.1 | ||||
| ============================================= | ============================================= | ||||
| @@ -1030,6 +1030,10 @@ | |||||
| <first>Ray</first> | <first>Ray</first> | ||||
| <last>Waldin</last> | <last>Waldin</last> | ||||
| </name> | </name> | ||||
| <name> | |||||
| <first>Remie</first> | |||||
| <last>Bolte</last> | |||||
| </name> | |||||
| <name> | <name> | ||||
| <first>Richard</first> | <first>Richard</first> | ||||
| <last>Evans</last> | <last>Evans</last> | ||||
| @@ -279,6 +279,12 @@ public class Tar extends MatchingTask { | |||||
| return; | return; | ||||
| } | } | ||||
| File parent = tarFile.getParentFile(); | |||||
| if (parent != null && !parent.isDirectory() && !parent.mkdirs()) { | |||||
| throw new BuildException("Failed to create missing parent" | |||||
| + " directory for " + tarFile); | |||||
| } | |||||
| log("Building tar: " + tarFile.getAbsolutePath(), Project.MSG_INFO); | log("Building tar: " + tarFile.getAbsolutePath(), Project.MSG_INFO); | ||||
| TarOutputStream tOut = null; | TarOutputStream tOut = null; | ||||
| @@ -618,6 +618,13 @@ public class Zip extends MatchingTask { | |||||
| if (!state.isOutOfDate()) { | if (!state.isOutOfDate()) { | ||||
| return; | return; | ||||
| } | } | ||||
| File parent = zipFile.getParentFile(); | |||||
| if (parent != null && !parent.isDirectory() && !parent.mkdirs()) { | |||||
| throw new BuildException("Failed to create missing parent" | |||||
| + " directory for " + zipFile); | |||||
| } | |||||
| updatedFile = true; | updatedFile = true; | ||||
| if (!zipFile.exists() && state.isWithoutAnyResources()) { | if (!zipFile.exists() && state.isWithoutAnyResources()) { | ||||
| createEmptyZip(zipFile); | createEmptyZip(zipFile); | ||||