conor 2003/02/13 05:19:29
Modified: src/main/org/apache/tools/ant/taskdefs Zip.java
Log:
Make message clear when updating and whenempty=skip
PR: 4448
Revision Changes Path
1.95 +9 -3 ant/src/main/org/apache/tools/ant/taskdefs/Zip.java
Index: Zip.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Zip.java,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -w -u -r1.94 -r1.95
--- Zip.java 12 Feb 2003 09:05:04 -0000 1.94
+++ Zip.java 13 Feb 2003 13:19:28 -0000 1.95
@@ -701,9 +701,15 @@
Resource[][] initialResources = grabResources(filesets);
if (isEmpty(initialResources)) {
if (emptyBehavior.equals("skip")) {
+ if (doUpdate) {
+ log(archiveType + " archive " + zipFile
+ + " not updated because no new files were
included.",
+ Project.MSG_VERBOSE);
+ } else {
log("Warning: skipping " + archiveType + " archive "
+ zipFile + " because no files were included.",
Project.MSG_WARN);
+ }
} else if (emptyBehavior.equals("fail")) {
throw new BuildException("Cannot create " + archiveType
+ " archive " + zipFile +