Return-Path: X-Original-To: apmail-ant-dev-archive@www.apache.org Delivered-To: apmail-ant-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DD006F711 for ; Thu, 9 May 2013 15:44:17 +0000 (UTC) Received: (qmail 57206 invoked by uid 500); 9 May 2013 15:44:17 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 57156 invoked by uid 500); 9 May 2013 15:44:17 -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 57148 invoked by uid 99); 9 May 2013 15:44:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 May 2013 15:44:17 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jeanlouis.boudart@gmail.com designates 209.85.210.171 as permitted sender) Received: from [209.85.210.171] (HELO mail-ia0-f171.google.com) (209.85.210.171) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 May 2013 15:44:11 +0000 Received: by mail-ia0-f171.google.com with SMTP id r13so3409910iar.30 for ; Thu, 09 May 2013 08:43:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=f1sUGiHLolNm9+SpFC+4ifNcpo1jPfA1zh9ZhUwwoWA=; b=ehqIbzBx/Lfw8S59dSTioXetKme2ddwK1nfYmQyLCQ6EBy8Js6yC1zmF5A9AjZaPB6 fnIXfF+9YhUMLdTEhersHv1aLfFYT1NGQ6pXFwnRQk4vopSgXMZqqx4yN6nR7kKtzFSd 1cI33o+zyPXEER6dF/AzmTvvRaSuuAnIMWcBCrWzvLQUoUJZ/0AvokTOUVqWJKKd3iYI iKj30P/Y1u5fp1H93+85zbq/7QYgJQ+0cnOuz4JZx2fpNM/67Ktxwd1AKTESBN1SS/HG b/L2Kf9roiZBuphIVdmFEJIDST8UjueQgR20mNVS3V237fY6WRRc1XZjyWz+bKNpO98c 9eiQ== MIME-Version: 1.0 X-Received: by 10.50.126.105 with SMTP id mx9mr4131182igb.20.1368114230277; Thu, 09 May 2013 08:43:50 -0700 (PDT) Received: by 10.50.120.104 with HTTP; Thu, 9 May 2013 08:43:50 -0700 (PDT) In-Reply-To: References: <1113156728826451397@unknownmsgid> <003f01ce47e1$c7eec210$57cc4630$@de> <4BD43543-5241-4FD0-9D70-E2F57532FD09@gmx.de> Date: Thu, 9 May 2013 17:43:50 +0200 Message-ID: Subject: Re: Adding if/unless conditions on commandline args From: Jean-Louis Boudart To: Ant Developers List Content-Type: multipart/alternative; boundary=047d7b4145d4b5526a04dc4aeaee X-Virus-Checked: Checked by ClamAV on apache.org --047d7b4145d4b5526a04dc4aeaee Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I'm not a big fan of adding this feature through internal namespaces, was there any complication to do it without namespaces ? Anyway it does the job, and stuff looks extensible so i'm fine with current solution if no one objects. 49036 add 'unless' attribute to JUnit test element was already solved isn't it ? 2013/5/6 Peter Reilly > wow, I had forgot about that! > > Peter > > > On Mon, May 6, 2013 at 12:55 AM, Antoine Levy Lambert >wrote: > > > Hi, > > > > I have committed a patch created by Peter Reilly back in 2007. > > > > The bugzilla PR is 43362 [1] > > > > If the community is happy with this change we will be able to close a > > number of bug reports requesting if/unless on various elements . > > For instance 49136 requesting if/unless support for attribute nested > > element of manifest task, > > 49036 add 'unless' attribute to JUnit test element, > > ... > > > > Regards, > > > > Antoine > > > > [1] https://issues.apache.org/bugzilla/show_bug.cgi?id=3D43362 > > > > On May 3, 2013, at 5:37 AM, Jan Mat=E8rne (jhm) wrote: > > > > > AFAIK this was discussed several times in the past (few years) with t= he > > > result, that having if/unless an _all_ elements would decrease > > > maintainability of the build scripts. > > > > > > But +1 from me for having if/unless on nested elements. > > > > > > What about supporting more complex conditions via nested > > > elements? > > > > > > > > > Jan > > > > > >> -----Urspr=FCngliche Nachricht----- > > >> Von: Michael Clarke [mailto:michael.m.clarke@gmail.com] > > >> Gesendet: Freitag, 3. Mai 2013 11:01 > > >> An: Ant Developers List > > >> Betreff: Re: Adding if/unless conditions on commandline args > > >> > > >> +1 from me too > > >> > > >> On 3 May 2013, at 09:37, Jean-Louis Boudart > > >> wrote: > > >> > > >>> +1 > > >>> > > >>> > > >>> 2013/5/3 Antoine Levy Lambert > > >>> > > >>>> I wonder whether we could not add if an unless on all nested > > >> elements > > >>>> in the framework ? > > >>>> > > >>>> > > >>>> Regards, > > >>>> > > >>>> Antoine > > >>>> On May 3, 2013, at 2:57 AM, Jean-Louis Boudart wrote: > > >>>> > > >>>>> Hi, > > >>>>> > > >>>>> It's currently difficult to make reusable script when using > > >>>>> task > > >>>> or > > >>>>> any other task using commandline args. > > >>>>> We oftenly need some "dynamic arguments" and this can be > > >> complicated. > > >>>>> > > >>>>> Therefor, i suggest to introduce if/unless conditions on comand > > >> line > > >>>> args : > > >>>>> > > >>>>> > > >>>>> > > >>>>> > >>>>> value=3D"${commit.message}"/> > > >>>>> > > >>>>> I have a working implementation with related tests and > > >> documentation. > > >>>>> Commandline.Arg class now extends ProjectComponent, and expose > > >>>>> accessors for if/unless condition, and rely on PropertyHelper to > > >> check conditions. > > >>>>> > > >>>>> Is this sufficient ? From what i have seen, it doesn't break > > >>>>> backward compatibility at least all tests are green :p. > > >>>>> > > >>>>> The setProject(Project p) method should be invoked "automatically= " > > >>>>> by ProjectHelper isn't it ? > > >>>>> > > >>>>> If ant is used in pure java and we ommited invoking > > >>>>> setProject(Project p) method, it should also works as > > >> PropertyHelper seems null safe. > > >>>>> > > >>>>> If there is no objection i will commit this this week end. > > >>>> > > >>>> > > >>>> ------------------------------------------------------------------= -- > > >> - > > >>>> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For > > >> additional > > >>>> commands, e-mail: dev-help@ant.apache.org > > >>>> > > >>>> > > >>> > > >>> > > >>> -- > > >>> Jean Louis Boudart > > >>> Independent consultant > > >>> Apache EasyAnt commiter http://ant.apache.org/easyant/ > > >> > > >> --------------------------------------------------------------------= - > > >> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additiona= l > > >> commands, e-mail: dev-help@ant.apache.org > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org > > > For additional commands, e-mail: dev-help@ant.apache.org > > > > > > > > --=20 Jean Louis Boudart Independent consultant Apache EasyAnt commiter http://ant.apache.org/easyant/ --047d7b4145d4b5526a04dc4aeaee--