Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 19084 invoked from network); 6 Nov 2007 17:23:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Nov 2007 17:23:46 -0000 Received: (qmail 79252 invoked by uid 500); 6 Nov 2007 17:23:33 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 79203 invoked by uid 500); 6 Nov 2007 17:23:33 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 79192 invoked by uid 99); 6 Nov 2007 17:23:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Nov 2007 09:23:33 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Nov 2007 17:23:44 +0000 Received: by brutus.apache.org (Postfix, from userid 33) id A4F18714238; Tue, 6 Nov 2007 09:23:24 -0800 (PST) From: bugzilla@apache.org To: dev@ant.apache.org Subject: DO NOT REPLY [Bug 43799] New: - Touch task fails when fileset is empty Message-ID: X-Bugzilla-Reason: AssignedTo Date: Tue, 6 Nov 2007 09:23:24 -0800 (PST) X-Virus-Checked: Checked by ClamAV on apache.org DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=43799 Summary: Touch task fails when fileset is empty Product: Ant Version: 1.7.0 Platform: PC OS/Version: Linux Status: NEW Severity: major Priority: P3 Component: Core tasks AssignedTo: dev@ant.apache.org ReportedBy: chris.lear@laculine.com The touch task gives the error "Specify at least one source--a file or resource collection." when the nested fileset yields no files to touch. It's a problem because I want to be able to touch files only on certain conditions. This build.xml snippet has been working fine in ant 1.6.4: This bug appears to have been introduced in revision 277936, Mon Mar 14 11:45:29 2005 UTC. See the diff here (line 224): http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Touch.java?r1=277936&r2=349637&diff_format=h I can get it working using this change: $ svn diff src/main/org/apache/tools/ant/taskdefs/Touch.java Index: src/main/org/apache/tools/ant/taskdefs/Touch.java =================================================================== --- src/main/org/apache/tools/ant/taskdefs/Touch.java (revision 592480) +++ src/main/org/apache/tools/ant/taskdefs/Touch.java (working copy) @@ -222,7 +222,7 @@ * @since Ant 1.6.3 */ protected synchronized void checkConfiguration() throws BuildException { - if (file == null && resources.size() == 0) { + if (file == null && resources==null) { throw new BuildException("Specify at least one source" + "--a file or resource collection."); } I'm not sure this is 100% appropriate, but it works for me. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org