Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 56639 invoked from network); 3 May 2010 13:54:14 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 May 2010 13:54:14 -0000 Received: (qmail 9168 invoked by uid 500); 3 May 2010 13:54:13 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 9109 invoked by uid 500); 3 May 2010 13:54:12 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 9101 invoked by uid 99); 3 May 2010 13:54:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 May 2010 13:54:12 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=AWL,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [88.84.128.168] (HELO samaflost.de) (88.84.128.168) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 May 2010 13:54:06 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by samaflost.de (Postfix) with ESMTP id 8028C28985D1 for ; Mon, 3 May 2010 15:53:44 +0200 (CEST) Received: from samaflost.de ([127.0.0.1]) by localhost (v35516.1blu.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ULgqyZvkjjv7 for ; Mon, 3 May 2010 15:53:44 +0200 (CEST) Received: by samaflost.de (Postfix, from userid 1000) id 818E028985D2; Mon, 3 May 2010 15:53:42 +0200 (CEST) From: Stefan Bodewig To: user@ant.apache.org Subject: Re: FileNameMapper implementation gets invoked twice inside a References: <704794.29746.qm@web56903.mail.re3.yahoo.com> X-Draft-From: ("nnfolder:mail.jakarta-ant-user" 67859) Date: Mon, 03 May 2010 15:53:42 +0200 In-Reply-To: <704794.29746.qm@web56903.mail.re3.yahoo.com> (Marco Faustinelli's message of "Mon, 3 May 2010 05:43:15 -0700 (PDT)") Message-ID: <87zl0hum55.fsf@v35516.1blu.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On 2010-05-03, Marco Faustinelli wrote: > I have written a FileNameMapper that gets invoked during the run of a > task. What puzzles me is that the mapper is invoked TWICE per > each file handled by the copy task, whereas I request only ONE > invocation. I don't think Ant makes any guarantees about how often it may want to invoke a mapper. >From the top of my head - I'd have to look into the code to be sure - the mapper is invoked once when Ant determines which files to copy at all (to provide the target for timestamp comparisons) and once when the file is actually copied. Please note that it gets invoked during the "what needs to be copied anyway" phase even for files that won't be copied later at all. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org