Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 9886 invoked from network); 7 May 2010 10:48:43 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 May 2010 10:48:43 -0000 Received: (qmail 76706 invoked by uid 500); 7 May 2010 10:48:42 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 75717 invoked by uid 500); 7 May 2010 10:48:38 -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 75695 invoked by uid 99); 7 May 2010 10:48:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 May 2010 10:48:36 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [15.193.32.63] (HELO g6t0186.atlanta.hp.com) (15.193.32.63) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 May 2010 10:48:26 +0000 Received: from G1W0400.americas.hpqcorp.net (unknown [16.236.31.10]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by g6t0186.atlanta.hp.com (Postfix) with ESMTPS id C34A32D1F9 for ; Fri, 7 May 2010 10:48:00 +0000 (UTC) Received: from G6W0644.americas.hpqcorp.net (16.230.34.80) by G1W0400.americas.hpqcorp.net (16.236.31.10) with Microsoft SMTP Server (TLS) id 8.2.176.0; Fri, 7 May 2010 10:46:05 +0000 Received: from GVW1115EXC.americas.hpqcorp.net ([16.228.11.78]) by G6W0644.americas.hpqcorp.net ([16.230.34.80]) with mapi; Fri, 7 May 2010 10:46:02 +0000 From: "Bailey, Darragh" To: Ant Users List Date: Fri, 7 May 2010 10:46:00 +0000 Subject: RE: Better alternative than using foreach, for and if/then/else? Thread-Topic: Better alternative than using foreach, for and if/then/else? Thread-Index: AcrszcMhQQVUuliLS8yEoigkJWnHUgAaAJ2w Message-ID: References: <874oil8zs4.fsf@v35516.1blu.de> In-Reply-To: <874oil8zs4.fsf@v35516.1blu.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org > -----Original Message----- > From: Stefan Bodewig [mailto:bodewig@apache.org]=20 > Sent: 06 May 2010 04:39 > To: user@ant.apache.org > Subject: Re: Better alternative than using foreach, for and=20 > if/then/else? >=20 > On 2010-05-05, Bailey, Darragh wrote: >=20 > > 1) Is for/foreach the only real option for what I'm attempting to > > accomplish here in building multiple end targets based on=20 > the contents > > of properties? >=20 > I'd recommend writing a custom task for this rather than trying to > implement it in XML. Using Ant's support for scripting engines you > could implement that task inline - for example if compiling and > deploying a Java task as part of the build process was too difficult. That does seem to be the best solution at the moment, I was hoping that the= re would be a way to accomplish this through adjusting how I was trying to = use Ant. > If you use Java6 you have all parts required to write tasks in > JavaScript together. >=20 > There may be tricks to make things work with pure XML and the=20 > antcontrib > tasks, but I'm not convinced the result will be maintainable. >=20 > Stefan Yeah, I think that a combination of for/foreach and some macrodefs could ac= complish what I want, but I'm not sure how well it can be maintained. I'll = probably experiment with that before building a custom task in Java, at the= very least to have a comparison. -- Regards, Darragh Bailey Systems Software Engineer Hewlett Packard Galway Ltd. Postal Address:=A0=A0=A0 Hewlett Packard Galway Limited, Ballybrit Business= Park, Galway Registered Office: Hewlett Packard Galway Limited, 63-74 Sir John Rogerson'= s Quay Dublin 2 Registered Number: 361933=20 --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org