Browse Source

Make message clear when updating and whenempty=skip

PR:	4448


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274067 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 22 years ago
parent
commit
f04c145a44
1 changed files with 9 additions and 3 deletions
  1. +9
    -3
      src/main/org/apache/tools/ant/taskdefs/Zip.java

+ 9
- 3
src/main/org/apache/tools/ant/taskdefs/Zip.java View File

@@ -701,9 +701,15 @@ public class Zip extends MatchingTask {
Resource[][] initialResources = grabResources(filesets); Resource[][] initialResources = grabResources(filesets);
if (isEmpty(initialResources)) { if (isEmpty(initialResources)) {
if (emptyBehavior.equals("skip")) { if (emptyBehavior.equals("skip")) {
log("Warning: skipping " + archiveType + " archive "
+ zipFile + " because no files were included.",
Project.MSG_WARN);
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")) { } else if (emptyBehavior.equals("fail")) {
throw new BuildException("Cannot create " + archiveType throw new BuildException("Cannot create " + archiveType
+ " archive " + zipFile + + " archive " + zipFile +


Loading…
Cancel
Save