Return-Path: Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 34840 invoked from network); 10 Oct 2000 18:32:13 -0000 Received: from postbox.viquity.com (HELO dcsrv0.ecom2ecom.com) (63.198.126.137) by locus.apache.org with SMTP; 10 Oct 2000 18:32:13 -0000 Received: by dcsrv0 with Internet Mail Service (5.5.2650.21) id ; Tue, 10 Oct 2000 11:31:26 -0700 Message-ID: <635802DA64D4D31190D500508B9B04104E0F41@dcsrv0> From: Jose Alberto Fernandez To: "'ant-dev@jakarta.apache.org'" Subject: RE: [PATCH] Allow check for values on if/unless Date: Tue, 10 Oct 2000 11:31:25 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N The problem I have with only allowing checking for property existance is that it really causes the pollution of the files with lots and lots of auxiliary properties whose only reason of existance is trying to check for a simple value. So if the user configuration passes me a property with three possible different values I will need to add three new properties to check for it. Now I know I could write my own little task to do this, but it seems to me such a simple capability should be available in the core. Would you be willing to add such a task to core if I do create it. I am thinking of: The when clauses specify which property to set (to the value of prop.name) if such value is the one specified. The else clause tells a property and value to set if none of the else clauses apply; if no value is provided for the else, the default is the value of the property or "true" if it was not set. If I give you this task, soon enough,would you be willing to add it? I think you can not get more declarative than that. I need to know because otherwise I will add it as part of our project tasks, so this will affect which package names I must use. Let me know.... Jose Alberto > -----Original Message----- > From: Stefan Bodewig [mailto:bodewig@bost.de] > Sent: Tuesday, October 10, 2000 2:03 AM > To: ant-dev@jakarta.apache.org > Subject: Re: [PATCH] Allow check for values on if/unless > > > >>>>> "JAF" == Jose Alberto Fernandez writes: > > JAF> Notice that the only thing you can do is check for equality "=" > JAF> and everything counts: spaces included. I dead that is I use == > JAF> people will want: !=, <=, or whatever. > > I'm afraid they will do anyway, once you open this up - including && > and || of course as well as indexOf to check for substrings ... > > Personally I'd prefer to not include you patch. It is quite easy to > write your own task that sets a property if another one has a given > value, you could even use scripting for it. > > Stefan >