execute has been run. <jar> would print a warning in Ant's own bootstrap when it zipped ant.jar for the second time. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268398 13f79535-47bb-0310-9956-ffa450edef68master
@@ -129,4 +129,13 @@ public class Jar extends Zip { | |||||
super.zipFile(file, zOut, vPath); | super.zipFile(file, zOut, vPath); | ||||
} | } | ||||
} | } | ||||
/** | |||||
* Make sure we don't think we already have a MANIFEST next time this task | |||||
* gets executed. | |||||
*/ | |||||
protected void cleanUp() { | |||||
manifestAdded = false; | |||||
super.cleanUp(); | |||||
} | |||||
} | } |
@@ -142,4 +142,13 @@ public class War extends Jar { | |||||
super.zipFile(file, zOut, vPath); | super.zipFile(file, zOut, vPath); | ||||
} | } | ||||
} | } | ||||
} | |||||
/** | |||||
* Make sure we don't think we already have a web.xml next time this task | |||||
* gets executed. | |||||
*/ | |||||
protected void cleanUp() { | |||||
descriptorAdded = false; | |||||
super.cleanUp(); | |||||
} | |||||
} |
@@ -231,6 +231,8 @@ public class Zip extends MatchingTask { | |||||
} | } | ||||
throw new BuildException(msg, ioe, location); | throw new BuildException(msg, ioe, location); | ||||
} finally { | |||||
cleanUp(); | |||||
} | } | ||||
} | } | ||||
@@ -525,4 +527,12 @@ public class Zip extends MatchingTask { | |||||
addFiles(ds, zOut, prefix, fullpath); | addFiles(ds, zOut, prefix, fullpath); | ||||
} | } | ||||
} | } | ||||
/** | |||||
* Do any clean up necessary to allow this instance to be used again. | |||||
* | |||||
* <p>When we get here, the Zip file has been closed and all we | |||||
* need to do is to reset some globals.</p> | |||||
*/ | |||||
protected void cleanUp() {} | |||||
} | } |