From 71e473c942aeebbea3ffef2bc7d227f11bb49cd0 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Fri, 26 Sep 2008 11:35:52 +0000 Subject: [PATCH] Improve logging. PR 45716. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@699282 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/taskdefs/UpToDate.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/UpToDate.java b/src/main/org/apache/tools/ant/taskdefs/UpToDate.java index 6059be3e2..8a8daa644 100644 --- a/src/main/org/apache/tools/ant/taskdefs/UpToDate.java +++ b/src/main/org/apache/tools/ant/taskdefs/UpToDate.java @@ -192,6 +192,11 @@ public class UpToDate extends Task implements Condition { null, null, mapperElement.getImplementation()).length == 0; } + if (!upToDate) { + log(sourceFile.getAbsolutePath() + + " is newer than (one of) its target(s).", + Project.MSG_VERBOSE); + } } // filesets are separate from the rest for performance @@ -208,8 +213,10 @@ public class UpToDate extends Task implements Condition { if (upToDate) { Resource[] r = sourceResources.listResources(); - upToDate = ResourceUtils.selectOutOfDateSources( + if (r.length > 0) { + upToDate = ResourceUtils.selectOutOfDateSources( this, r, getMapper(), getProject()).length == 0; + } } return upToDate;