Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 4372 invoked from network); 4 Aug 2006 14:44:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Aug 2006 14:44:03 -0000 Received: (qmail 86269 invoked by uid 500); 4 Aug 2006 14:43:58 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 86226 invoked by uid 500); 4 Aug 2006 14:43:58 -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 86204 invoked by uid 99); 4 Aug 2006 14:43:57 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Aug 2006 07:43:57 -0700 X-ASF-Spam-Status: No, hits=2.8 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,DNS_FROM_RFC_WHOIS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [206.190.58.150] (HELO web55101.mail.re4.yahoo.com) (206.190.58.150) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 04 Aug 2006 07:43:57 -0700 Received: (qmail 55752 invoked by uid 60001); 4 Aug 2006 14:43:36 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=S5i8vzyp5SXnFqgC/mouVvYSk0klnsDey0jPj5Ty+EASH3L4LZHE2+0wTR6GiZyL+DAr9UoLiurvrLebaFf79d9qAFgzX+O77psVlbzrvxFLkio73rnBJfFoepOmGAnPo3HWwVJTqJoKDbFENRD6Ux6zh7Xn74vA4i9Ph2wCqvI= ; Message-ID: <20060804144336.55750.qmail@web55101.mail.re4.yahoo.com> Received: from [66.10.233.130] by web55101.mail.re4.yahoo.com via HTTP; Fri, 04 Aug 2006 07:43:35 PDT Date: Fri, 4 Aug 2006 07:43:35 -0700 (PDT) From: Matt Benson Subject: Re: Setting the value of a property conditonally To: Ant Users List In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --- cknell@onebox.com wrote: > I've been testing the task and either it > is very limited in its functioning or I am carrying > the wrong mental model into the exercise. Charles, I am going back to your initial mail to address your statement of having the wrong mental model. Here is where you originally hit the proverbial nail on the head. Ant's condition task was designed with the simplest paradigm in mind: if, if, if. 's 'else' attribute is a recent addition as the manual attests (since 1.6.3, which for all practical purposes, means since 1.6.5, i.e. the current version). 'else' can be used for convenience when you don't want to say: Obviously here it is easy to use: So for more complex situations you could simply use multiple conditions as you would e.g. multiple ifs in code, arranged from highest to lowest priority. But for the particular task you are describing here, I might well take Antoine LL's advice and write a custom task. HTH, Matt > > I work mostly in XSLT these days. There I can set > the value of a variable by testing any number of > conditions and nested conditions using the > element. > > appears to be based on the > "if-then-else" model. What I'm looking for is a > means of setting a property on the > "if-then-else-elsif" model. > > Is there some way of doing this with ant 1.65 as it > stands or do I have to write an extension to > accomplish this? > > Thanks. > > -- > Charles Knell > cknell@onebox.com - email > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > user-unsubscribe@ant.apache.org > For additional commands, e-mail: > user-help@ant.apache.org > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org