Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 96998 invoked from network); 24 Sep 2009 15:42:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Sep 2009 15:42:59 -0000 Received: (qmail 4623 invoked by uid 500); 24 Sep 2009 15:42:59 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 4541 invoked by uid 500); 24 Sep 2009 15:42:59 -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 4531 invoked by uid 99); 24 Sep 2009 15:42:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Sep 2009 15:42:58 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.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; Thu, 24 Sep 2009 15:42:49 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by samaflost.de (Postfix) with ESMTP id 089AA28985E1 for ; Thu, 24 Sep 2009 17:42:29 +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 5IM0JXh58E5u for ; Thu, 24 Sep 2009 17:42:21 +0200 (CEST) Received: by samaflost.de (Postfix, from userid 1000) id 4CAC828985E2; Thu, 24 Sep 2009 17:42:21 +0200 (CEST) From: Stefan Bodewig To: dev@ant.apache.org Subject: Re: if/unless Attributes References: <873a6co9x7.fsf@v35516.1blu.de> <255d8d690909240719x120764f8uc6faa73330024ec2@mail.gmail.com> X-Draft-From: ("nnfolder:mail.jakarta-ant" 95959) Date: Thu, 24 Sep 2009 17:42:20 +0200 In-Reply-To: <255d8d690909240719x120764f8uc6faa73330024ec2@mail.gmail.com> (Dominique Devienne's message of "Thu, 24 Sep 2009 09:19:47 -0500") Message-ID: <87my4kmjs3.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=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On 2009-09-24, Dominique Devienne wrote: > On Thu, Sep 24, 2009 at 6:32 AM, Stefan Bodewig wrot= e: >> the if/unless attributes for target have changes slightly in that they >> now may use PropertyHelpers. =C2=A0I.e. >> >> will not be executed if ${foo} happens to expand to a Boolean instance >> with a booleanValue() of "false" and likewise >> >> will be executed in that case. =C2=A0So far this hasn't been documented,= but >> I'll do so shortly. > That's a pretty big change. As is the changed PropertyHelper API. In fact Matt added that more or less at the same time. I just stumbled over it while trying to understand PropertyHelper 8-) > What's the exact semantic? Does it depend on the type returned, like > Boolean, Object, String. Yes, it only applies to Boolean. > For String, does that fall back to assuming it's a property name that > must be checked for existence? the logic in target is: * try to evaluate the argument (${foo}) as a property=20 * if the result is a Boolean, use its booleanValue * if it is not a Boolean, ignore it completely but instead check whether a property of the argument's name exists - just like in Ant 1.7.1 this does not expand ${foo} so it would look literally look up a property named ${foo}. > What's the exact timing of the evaluation? Before or after depends' targe= ts? The same as before - at the start of Target#execute, i.e. it doesn't factor into depends at all. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org