<delete file="${wrapper-log-path}" quiet="true" /> leads to: [delete] Deleting: /Users/benson/x/oap/it/smoke/target/sandbox/jdd-install/logs/wrapper.log The doc seems to be telling me that, without a setting of 'verbose="true", it won't talk. Is the doc wrong?
This is tricky. When deleting a directory tree Ant explicitly logs a "normal" level message for the top level dir and verbose affects the individual files and directories inside the tree. When you use a single file arg this is considered the same as the top-level of the tree. The fix is simple Index: src/main/org/apache/tools/ant/taskdefs/Delete.java =================================================================== --- src/main/org/apache/tools/ant/taskdefs/Delete.java (revision 1190217) +++ src/main/org/apache/tools/ant/taskdefs/Delete.java (working copy) @@ -551,7 +551,8 @@ + " cannot be removed using the file attribute. " + "Use dir instead.", quiet ? Project.MSG_VERBOSE : ver bosity); } else { - log("Deleting: " + file.getAbsolutePath()); + log("Deleting: " + file.getAbsolutePath(), + quiet ? Project.MSG_VERBOSE : verbosity); if (!delete(file)) { handle("Unable to delete file " + file.getAbsolutePath()); but would make the logging logic of that task (even more) inconsistent. You get the behavior you want by using a nested <file> resource rather than the file attribute. <delete quiet="true"> <file file="${wrapper-log-path}" /> </delete> Did I say logging already was inconsistent?
Created attachment 37547 [details] 修复漏洞
Comment on attachment 37547 [details] 修复漏洞 some nonsense
The content of attachment 37547 [details] has been deleted for the following reason: not-working PHP snippet