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 92BE9F8A2 for ; Fri, 3 May 2013 08:01:45 +0000 (UTC) Received: (qmail 48783 invoked by uid 500); 3 May 2013 08:01:45 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 48611 invoked by uid 500); 3 May 2013 08:01:42 -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 48573 invoked by uid 99); 3 May 2013 08:01:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 May 2013 08:01:40 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of antoine@gmx.de designates 212.227.15.19 as permitted sender) Received: from [212.227.15.19] (HELO mout.gmx.net) (212.227.15.19) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 May 2013 08:01:33 +0000 Received: from mailout-de.gmx.net ([10.1.76.1]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0MAAjv-1UirFB3qA5-00BKvz for ; Fri, 03 May 2013 10:01:12 +0200 Received: (qmail invoked by alias); 03 May 2013 08:01:12 -0000 Received: from pool-72-89-117-64.nycmny.east.verizon.net (EHLO [192.168.1.69]) [72.89.117.64] by mail.gmx.net (mp001) with SMTP; 03 May 2013 10:01:12 +0200 X-Authenticated: #22961642 X-Provags-ID: V01U2FsdGVkX1/04Xd2R1v05WIE3A7pvrZ78FXjJ3y1eseGo2udRo iWeR8r9YaSCt1e Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Apple Message framework v1283) Subject: Re: Adding if/unless conditions on commandline args From: Antoine Levy Lambert In-Reply-To: Date: Fri, 3 May 2013 04:01:12 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: "Ant Developers List" X-Mailer: Apple Mail (2.1283) X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org 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, >=20 > 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. >=20 > Therefor, i suggest to introduce if/unless conditions on comand line = args : >=20 > > > > > > >=20 > 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. >=20 > Is this sufficient ? =46rom what i have seen, it doesn't break = backward > compatibility at least all tests are green :p. >=20 > The setProject(Project p) method should be invoked "automatically" by > ProjectHelper isn't it ? >=20 > If ant is used in pure java and we ommited invoking setProject(Project = p) > method, it should also works as PropertyHelper seems null safe. >=20 > 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